In Drupal 8 have a custom module for which bundles are created via yaml files in its config/install folder. I need to add an additional field to the 'schema.'

My steps were:

  • pm-uninstall the module
  • delete the content type via the ui
  • rebuild cache
  • add the new yaml file (a clone of an existing file with the field name changed)
  • re-enable the module

This gave me an unmet dependencies error.

If I remove the file and enable the module, the bundle is created, without the field of course.

I can create the field via the ui, but then its yaml file is not present in the install folder, so the module isn't deployable as-is.


You have to add the field via the UI. Then you can export the yml config files required by the field by

  1. Using drush cex sync
  2. Navigating to admin/config/development/configuration/single/export and export the changed/new files on admin/config/development/configuration manually.

Copy the new/changed files to your config/install folder and you are good to go

  • Hi. Thanks for the reply. Copy them to config/install as in docroot, or overwrite the module's? – JAyenGreen Mar 28 '17 at 16:38
  • Add/override them in your_module/config/install – Robin Mar 28 '17 at 17:51

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