I installed Drupal 8 into on my localhost, working under Windows 7 with OpenServer. After it I tried to install Drupal Console using Composer. Namely, this way

composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader

It installed without errors. But when I'm trying to execute Drupal Console (with command "drupal"), there is an error on the console:

Fatal error: Cannot use Drupal\Console\Core\Bootstrap\DrupalConsoleCore as DrupalConsoleCore because the name is already in use in D:\OpenServer\domains\palomniki.local\vendor\drupal\console\src\Bootstrap\Drupal.php on line 11

Could you clarify me, how to solve this problem ?

Frankly speaking, I managed to find answers of the error, where they advice to reinstall Drupal Console, but I don't know what they means. I tried to do remove this package, then to reinstall it, but I wasn't able to fix the error.


Drupal console global executable is not at the same version as your current project

go outside any drupal project and and execute: drupal self-update


Run "drupal self-update" as administrator or whatever the windows equivalent to sudo is.

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.