My build process is (mostly working), but sometimes when I swap out to a new project, I am winding up with an error which looks like the output below. I have found this error message extremely unhelpful in sorting out what my underlying issue might be. And having resolved this issue in the past, and folded it into my build process, does not seem to have resolved it for all future builds of similar projects. I am seeking advice on how to proceed here, would appreciate any help I can get, please. Thanks.



Switching out to use the local drush ( sudo -u jenkins vendor/drush/drush/drush site-install . . . ) does not appear to have changed the outcome.

Is your site managed with Composer? Yes. What template? no site template, just a composer.json file derived originally from drupal-composer/drupal-project. What version of Drush? Drush Commandline Tool 9.7.2 What version of Drupal? composer.json specifies: "drupal/core": "~8.8.5",.

-- Hugh Esco

# sudo -u jenkins /usr/local/drush/drush site-install \
    -y -vvv \
    --db-url='mysql://my_project_code_db_user_dev:a_somewhat_secret_db_password@localhost/my_project_code_db_dev' \
    --db-su=root --db-su-pw='my_very_secret_root_password' \
    --account-mail=site-admin@example.org \
    --account-name=admin \
    --account-pass=reallysecret \

 [preflight] Config paths: /opt/local/my_project_code/drupal/vendor/drush/drush/drush.yml,/opt/local/my_project_code/drupal/drush/drush.yml
 [preflight] Alias paths: /opt/local/my_project_code/drupal/web/drush/sites,/opt/local/my_project_code/drupal/drush/sites
 [preflight] Commandfile search paths: /opt/local/my_project_code/drupal/vendor/drush/drush/src,/opt/local/my_project_code/drupal/drush
 [bootstrap] Starting bootstrap to root [0.12 sec, 8.69 MB]

In BootstrapHook.php line 32:

  Bootstrap failed. Run your command with -vvv for more information.

Exception trace:
  at /opt/local/my_project_code/drupal/vendor/drush/drush/src/Boot/BootstrapHook.php:32

 Drush\Boot\BootstrapHook->initialize() at /opt/local/my_project_code/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:34

 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /opt/local/my_project_code/drupal/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:27

 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /opt/local/my_project_code/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:145

 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /opt/local/my_project_code/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:289

 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /opt/local/my_project_code/drupal/vendor/symfony/console/Command/Command.php:221

 Symfony\Component\Console\Command\Command->run() at /opt/local/my_project_code/drupal/vendor/symfony/console/Application.php:1005

 Symfony\Component\Console\Application->doRunCommand() at /opt/local/my_project_code/drupal/vendor/symfony/console/Application.php:255

 Symfony\Component\Console\Application->doRun() at /opt/local/my_project_code/drupal/vendor/symfony/console/Application.php:148

 Symfony\Component\Console\Application->run() at /opt/local/my_project_code/drupal/vendor/drush/drush/src/Runtime/Runtime.php:118

 Drush\Runtime\Runtime->doRun() at /opt/local/my_project_code/drupal/vendor/drush/drush/src/Runtime/Runtime.php:49

 Drush\Runtime\Runtime->run() at /opt/local/my_project_code/drupal/vendor/drush/drush/drush.php:72

 require() at /opt/local/my_project_code/drupal/vendor/drush/drush/drush:4

site:install [--db-url DB-URL] [--db-prefix DB-PREFIX] 
[--db-su DB-SU] [--db-su-pw DB-SU-PW] 
[--account-name [ACCOUNT-NAME]] [--account-mail [ACCOUNT-MAIL]] 
[--site-mail [SITE-MAIL]] [--account-pass ACCOUNT-PASS] 
[--locale [LOCALE]] [--site-name [SITE-NAME]] 
[--site-pass SITE-PASS] [--sites-subdir SITES-SUBDIR] 
[--config-dir CONFIG-DIR] [--existing-config] [-h|--help] 
[-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] 
[--no-ansi] [-n|--no-interaction] [-d|--debug] 
[-y|--yes] [--no] 
[--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] 
[-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] 
[-D|--define DEFINE] [--notify] [--xh-link XH-LINK] 
[--druplicon] [--] <command> [<profile>]...

  • Looks as if you are using a globally installed Drush while Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency. Is your site managed with Composer? What template? What version of Drush? What version of Drupal? – leymannx Jul 22 at 5:52
  • Ah, vendor I see. Ah, is this the Drush Launcher at /usr/local/drush? What happens when you use the local Drush directly? /opt/local/my_project_code/drupal/vendor/drush/drush/drush si -y. Please update your question for clarification. – leymannx Jul 22 at 5:56


Thank you friend for your questions. They led me to update the version spec for drupal/core (and drupal/core-dev) in my composer.json to read "^8.8" instead. After that I was able to run:

# rm -rf vendor/ web/

# composer update 

# sudo -u jenkins /usr/local/drush/drush site-install \
    -y -vvv \
    --db-url='mysql://my_project_code_db_user_dev:a_somewhat_secret_db_password@localhost/my_project_code_db_dev' \
    --db-su=root --db-su-pw='my_very_secret_root_password' \
    --account-mail=site-admin@example.org \
    --account-name=admin \
    --account-pass=reallysecret \

# drush status
 Drupal version   : 8.9.2


 Database         : Connected
 Drupal bootstrap : Successful

and to produce a working base installation of drupal! Updating that in my code and running this again through my build process to see if it flies. Thanks for prodding me with that question.

| improve this answer | |
  • That worked the first time, and I suspect it helped, but I am still working to reproduce that success. – Hugh Esco Jul 23 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.