acquia / headless_lightning

A more opinionated flavor of Lightning for building decoupled applications. Support ended on November 2, 2021 and this project is no longer maintained.
https://lightning.acquia.com
GNU General Public License v2.0
58 stars 16 forks source link

BLT + Headless-lightning Throws config Error, out of the box. #81

Open justinlevi opened 6 years ago

justinlevi commented 6 years ago

I recently went through the blog post @danepowell made here: https://dev.acquia.com/blog/creating-a-decoupled-drupal-application-in-30-minutes-with-lightning-blt-and-drupalvm/28/11/2017/18886#comment-4381

The $ blt setup step is throwing the following error for me:

⚡ blt setup
Setting up local environment for site 'default' using drush alias @local.decoupled
> setup:build
> setup:behat
> setup:composer:install
Gathering patches for root package.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
> setup:git-hooks
Installing pre-commit git hook...
Installing commit-msg git hook...
> setup:settings
> frontend
> frontend:setup
> frontend:build
> setup:hash-salt
Hash salt already exists.
> setup:drupal:install
> internal:drupal:install
[Acquia\Blt\Robo\Tasks\DrushTask] Running /Users/justinwinter/Sites/decoupled/vendor/bin/drush @local.decoupled site-install headless_lightning install_configure_form.update_status_module='array(FALSE,FALSE)' install_configure_form.enable_update_status_module=NULL --site-name='BLTed 8' --site-mail=no-reply@acquia.com --account-name=Z4fLZpo6Si --account-mail=no-reply@acquia.com --locale=en --config-dir=../config/default --uri=default --yes --verbose in /Users/justinwinter/Sites/decoupled/docroot
Loaded alias @local.decoupled from file /Users/justinwinter/Sites/decoupled/docroot/../drush/site-aliases/local.aliases.drushrc.php       [notice]
Configuration import directory ../config/default does not contain any configuration; will skip import.                                 [warning]
Executing: mysql --defaults-extra-file=/private/tmp/drush_WfGDiE --database=drupal --host=localhost --port=3306 --silent  < /private/tmp/drush_nfxW8E > /dev/null
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
Sites directory /Users/justinwinter/Sites/decoupled/docroot/sites/default already exists - proceeding.                                    [notice]
Executing: mysql --defaults-extra-file=/private/tmp/drush_kJWZhR --database=drupal --host=localhost --port=3306 --silent  < /private/tmp/drush_Dd9eg3 > /dev/null
Executing: mysql --defaults-extra-file=/private/tmp/drush_ft74Ir --database=drupal --host=localhost --port=3306 --silent  < /private/tmp/drush_HWxl9v
Executing: mysql --defaults-extra-file=/private/tmp/drush_taXW0G --database=drupal --host=localhost --port=3306 --silent  < /private/tmp/drush_y3g5gC
Starting Drupal installation. This takes a while. Consider using the --notify global option.                                           [ok]
Drupal\Core\Config\PreExistingConfigException: Configuration objects (core.entity_form_display.media.image.default,                    [error]
core.entity_view_display.media.image.default, media.type.image) provided by lightning_media_image already exist in active configuration
in /Users/justinwinter/Sites/decoupled/docroot/core/lib/Drupal/Core/Config/PreExistingConfigException.php:65
Stack trace:
#0 /Users/justinwinter/Sites/decoupled/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php(492):
Drupal\Core\Config\PreExistingConfigException::create('lightning_media...', Array)
#1 /Users/justinwinter/Sites/decoupled/docroot/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php(132):
Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('module', 'lightning_media...')
#2 /Users/justinwinter/Sites/decoupled/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(145):
Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall('module', 'lightning_media...')
#3 /Users/justinwinter/Sites/decoupled/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):
Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#4 /Users/justinwinter/Sites/decoupled/docroot/core/includes/install.core.inc(1812):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#5 /Users/justinwinter/Sites/decoupled/docroot/core/includes/batch.inc(294): _install_module_batch('lightning_media...', 'Media Image',
Array)
#6 /Users/justinwinter/Sites/decoupled/docroot/core/includes/form.inc(875): _batch_process()
#7 /Users/justinwinter/Sites/decoupled/docroot/core/includes/install.core.inc(633): batch_process(Object(Drupal\Core\Url),
Object(Drupal\Core\Url))
#8 /Users/justinwinter/Sites/decoupled/docroot/core/includes/install.core.inc(554): install_run_task(Array, Array)
#9 /Users/justinwinter/Sites/decoupled/docroot/core/includes/install.core.inc(117): install_run_tasks(Array)
#10 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/drush.inc(726):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#11 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#12 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/commands/core/drupal/site_install.inc(82): drush_op('install_drupal',
Object(Composer\Autoload\ClassLoader), Array)
#13 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/commands/core/site_install.drush.inc(255):
drush_core_site_install_version('headless_lightn...', Array)
#14 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/command.inc(422): drush_core_site_install('headless_lightn...',
'install_configu...', 'install_configu...')
#15 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#16 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/command.inc(199): drush_command('headless_lightn...',
'install_configu...', 'install_configu...')
#17 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#18 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#19 /Users/justinwinter/Sites/decoupled/vendor/drush/drush/drush.php(12): drush_main()
#20 {main}
Command dispatch complete                                                                                                                 [notice]
[Acquia\Blt\Robo\Tasks\DrushTask]  Exit code 1  Time 22.978s
[error]  Failed to install Drupal! 
[error]  Command `internal:drupal:install ` exited with code 1. 
[error]  Command `setup:drupal:install ` exited with code 1. 
justinlevi commented 6 years ago

The issues appears to be with composer patches not getting applied correctly per this post https://github.com/acquia/blt/issues/2251

danepowell commented 6 years ago

I agree, it sounds like a problem with Composer Patches that you can work around by upgrading your version of Patch per this post: https://docs.acquia.com/article/fixing-failing-composer-patches-updating-gnu-patch

I'll try to get a link to that into the blog post