When adding Drupal Console using Composer, we are finding that the list of commands is not complete. How can I resolve the issue?

Installation steps:

  1. change to root directory (/local/path/drupal-site)
  2. run composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
  3. run composer update drupal/console --with-dependencies

Steps to reproduce:

  1. Change to either Change to drupal-site/vendor/bin/ or drupal-site/vendor/drupal/console/bin directory
  2. run drupal generate:form
  3. error message below is returned.
  4. change to root directory (/local/path/drupal-site)
  5. run vendor/bin/drupal generate:form
  6. error message below is returned again.

[ERROR] Command "generate:form", is not a valid command name.


  1. Drupal core v8.5.5
  2. Composer 1.6.3
  3. Drupal console 1.8.0

output of drupal list

drupal list

  • You’re probably running it outside a bootstrapped Drupal - the list of available commands is substantially shorter when you do that
    – Clive
    Commented Aug 23, 2018 at 18:38
  • @Clive how would we install it otherwise? The Drupal site was installed using Composer. Commented Aug 23, 2018 at 19:30
  • You need to run the command inside the web folder, otherwise drupal console doesn't find the drupal installation
    – Berdir
    Commented Aug 23, 2018 at 20:51

1 Answer 1


After spending hours on chasing this same issue, i quit and now use drush to create boilerplate stuff such as module, plugins etc. After you install drupal site via composer with --dev try the following.

./vendor/drush/drush/drush generate module-standard # other generate commands there as well
  • Yes, Drush has generators now.
    – Kevin
    Commented May 5, 2021 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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