I am attempting to update my site's database after updating three modules: Configuration Update Base, Search API, and Simple XML Sitemap. Running drush updatedb produces the following error:

Drupal\Core\Extension\Exception\UnknownExtensionException: The module devel_generate_example does not exist. [error]in /Applications/MAMP/htdocs/mysite/core/lib/Drupal/Core/Extension/ExtensionList.php:265
Stack trace:#0 /Applications/MAMP/htdocs/mysite/core/lib/Drupal/Core/Extension/ExtensionList.php(579):
#1 /Applications/MAMP/htdocs/mysite/core/includes/update.inc(318):
#2 /usr/local/Cellar/drush/8.1.12/libexec/commands/core/drupal/update.inc(134): update_get_update_list()
#3 /usr/local/Cellar/drush/8.1.12/libexec/commands/core/core.drush.inc(462): update_main()
#4 /usr/local/Cellar/drush/8.1.12/libexec/includes/command.inc(422): drush_core_updatedb()
#5 /usr/local/Cellar/drush/8.1.12/libexec/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#6 /usr/local/Cellar/drush/8.1.12/libexec/includes/command.inc(199): drush_command()
#7 /usr/local/Cellar/drush/8.1.12/libexec/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#8 /usr/local/Cellar/drush/8.1.12/libexec/includes/preflight.inc(66):
#9 /usr/local/Cellar/drush/8.1.12/libexec/drush.php(12): drush_main()
#10 {main}

I have confirmed that Devel and all of its submodules (including devel_generate and devel_generate_example) are installed. I have attempted deactivating, uninstalling, and reinstalling them, but I am still getting the same error. Does this look familiar to anyone?


Drupal can't find the module when it's scanning the codebase. You'll have to debug to figure out why. Run drush eval 'print_r(array_map(function ($ext) { return $ext->subpath; }, \Drupal::service("extension.list.module")->getList()));' to have Drupal dump what modules it can see and try see why it can't find the install location location (file permissions?).

| improve this answer | |
  • Thanks! I ran your drush command, and devel_generate is on the list, so I'm still not sure why it's not finding devel_generate_example, which is a submodule of devel_generate. I have another Drupal site with a nearly identical configuration that is not having this problem, so hopefully some comparisons will help shed some light. – JOakland Apr 15 at 16:12
  • OK, this has actually turned out to be a larger issue with my site, unrelated to the Devel module. For some reason, I need to have settings['extension_discovery_scan_tests'] = TRUE; in settings.php in order to successfully run the update script. This is usually only set in settings.local.php. I'm not sure why this Drupal installation needs to be able to locate all the testing submodules in order to update. The mystery continues! – JOakland Apr 16 at 17:22

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.