Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • May 31 10:24
  • May 29 21:06
    acnimda commented #3885
  • May 29 19:46
    spiritcapsule commented #3885
  • May 29 12:47
    anjinesie commented #3885
  • May 29 12:40
    jmevalentin commented #3885
  • May 29 12:38
    anjinesie commented #3885
  • May 29 06:04
    acnimda commented #3885
  • May 29 00:43
    philipsoares starred hechoendrupal/drupal-console
  • May 28 23:35
    spiritcapsule commented #3885
  • May 28 23:17
    spiritcapsule commented #3885
  • May 28 23:07
    spiritcapsule commented #3885
  • May 24 14:57
  • May 21 02:52
    rfsbsb commented #4230
  • May 20 19:08
    SilverWhitefish commented #4207
  • May 20 17:35
    SilverWhitefish commented #4207
  • May 20 17:22
    SilverWhitefish commented #4207
  • May 20 17:14
    SilverWhitefish commented #4207
  • May 20 17:13
    SilverWhitefish commented #4207
  • May 20 16:46
    Flodevelop commented #3885
  • May 20 16:46
    Flodevelop commented #3885
Kevin Gautreau
following this issue : hechoendrupal/drupal-console#4086
I tried to install the dev version of drupal console : "drupal/console": "dev-master"
but it seems that the 1.9.1 version of console-core was not tagged yet but it's on the console's composer.json, So it end up with the following error :
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/console dev-master requires drupal/console-core 1.9.1 -> no matching package found.
but I just wanted to let you know
Edys Meza Palacio
Hi guys, someone can share me some reading for extending a Commands
Someone know if this steps for create a genereator command it is working yet?
Hello. I just installed a drupal composer project and it comes with console installed, but when I list all the commands available, it does not show most of them and list generate just returns 3 commands, so basically console is useless. How is it supposed to be used?
Harold Juárez
Hi @edysmp_twitter That steps are still working. This is the new site of the docs
alice13005 Hi, I'm trying to create an open source tool for the comunity and struggling on a technical point in relation with entities
alice13005 I want to integrate an custom entity reference in a field of an other custom entity. Both entities work and I even managed to integrate the user entity reference (a drupal core entity) in one of them, but I need help with the syntax of integrating entity references
I am getting below while trying to install downloaded Drupal in working directory (html and project folder name drupal2)
:/var/www/html/drupal2$ drupal site:install
[ERROR] Drupal Console is not installed at: "
Someone help, please.
How resolve this issue?
$ mv drupal.phar /usr/local/bin/drupal
mv: cannot move 'drupal.phar' to '/usr/local/bin/drupal': No such file or directory
Norah Shannon

When I use generate:module and select yes for Would you like to add module dependencies?:

$ fin drupal generate:module

 // Welcome to the Drupal module generator

 Enter the new module name:
 > test

 Enter the module machine name [test]:

 Enter the module Path [modules/custom]:

 Enter module description [My Awesome Module]:

 Enter package name [Custom]:

 Enter Drupal Core version [8.x]:

 Do you want to generate a .module file? (yes/no) [yes]:

 Define module as feature (yes/no) [no]:

 Do you want to add a composer.json file to your module? (yes/no) [yes]:

 Would you like to add module dependencies? (yes/no) [no]:
 > yes

 Module dependencies separated by commas (i.e. context, panels):
 > simplenews

 Do you want to generate a unit test class? (yes/no) [yes]:
 > no

 Do you want to generate a themeable template? (yes/no) [yes]:
 > no

 Do you want proceed with the operation? (yes/no) [yes]:

I get the following error:

 // generate:composer
Error: Call to a member function getPath() on null in /var/www/vendor/drupal/console/src/Generator/ComposerGenerator.php on line 46 #0 /var/www/vendor/drupal/console/src/Command/Generate/ComposerCommand.php(410): Drupal\Console\Generator\ComposerGenerator->generate(Array)
#1 /var/www/vendor/symfony/console/Command/Command.php(255): Drupal\Console\Command\Generate\ComposerCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Drupal\Console\Core\Style\DrupalStyle))
#2 /var/www/vendor/drupal/console-core/src/EventSubscriber/CallCommandListener.php(76): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Drupal\Console\Core\Style\DrupalStyle))
#3 /var/www/vendor/symfony/event-dispatcher/EventDispatcher.php(212): Drupal\Console\Core\EventSubscriber\CallCommandListener->callCommands(Object(Symfony\Component\Console\Event\ConsoleTerminateEvent), 'console.termina...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#4 /var/www/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'console.termina...', Object(Symfony\Component\Console\Event\ConsoleTerminateEvent))
#5 /var/www/vendor/symfony/console/Application.php(1014): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('console.termina...', Object(Symfony\Component\Console\Event\ConsoleTerminateEvent))
#6 /var/www/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Drupal\Console\Command\Generate\ModuleCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/vendor/drupal/console-core/src/Application.php(188): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/vendor/symfony/console/Application.php(148): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()
#11 /var/www/vendor/drupal/console/bin/drupal(4): require('/var/www/vendor...')
#12 {main}
Error: Call to a member function getPath() on null in Drupal\Console\Generator\ComposerGenerator->generate() (line 46 of /var/www/vendor/drupal/console/src/Generator/ComposerGenerator.php).

Any idea what is going on here?


How resolve this issue?
$ mv drupal.phar /usr/local/bin/drupal
mv: cannot move 'drupal.phar' to '/usr/local/bin/drupal': No such file or directory

Windows doesn't have a /user/local/bin folder
See these instructions:

Sharif Elshobkshy

Hi Guys.
I'm getting a new error when executing a composer update or composer install

Package type "drupal-console-library" is not supported

Any ideas?
Frederick Henderson
@shariflp_twitter Sound like you don't have that package type define in your extra section. Are you using composer/installers and oomphinc/composer-installers-extender? You need to configure them in the extra section of composer.json to say where the packages of the type "drupal-console-library" should be placed instead of in the vendors folders.
Sharif Elshobkshy

Hi @frederickjh Package drupal/console requires vlucas/phpdotenv and drupal/console-dotenv
It's the last one (drupal/console-dotenv) that has a type:"drupal-console-library"

The project (with it's existing composer) has been working fine for years. So it weird that now it requires a definition in the extra section

And also, what should even "drupal-console-library" point to in the extra section?
Frederick Henderson
vlucas/phpdotenv is only a suggested package in the current composer.json for drupal/console. For drupal/console-dotenv I don't find in the composer.json so it must be a depenency of a package if it is trying to install it, but it is not directly required by composer.json.
Sharif Elshobkshy

I just noticed that I'm using drupal/console : 1.2 and there are a lot of newer versions.
I'm looking at the drupal/console repo and I see that drupal/console-dotenv was removed from the "require" section and added as a suggested package.

But then in another commit it was completely removed and replaced with vlucas/phpdotenv

So, it could be that updating to a newer Drupal Console version will fix the issue. However it doesn't explain why this package is suddenly causing this issue when running composer install or update.
As I mentioned, we have been using this package for a long time in the project.
I am install drupalconsole in MacOS 10.14.16 with comand composer global require drupal/console:@stable and generate error: Installation failed, reverting ./composer.json to its original content.
Maarten Segers
Anyone an idea why I have a console folder in my project after updating to console 1.9.1?
I didn't have this folder before.
Sharif Elshobkshy
Same here.
Art Williams
I noticed the same thing. If it's supposed to be there, should it be in my repo (i.e. config) or can it be ignored?
Jesus Manuel Olivas
It can be ignored or better update to latest 1.9.3 and that directory will be gone
Clem Mabiza
[ERROR] Class Drupal\Core\DrupalKernel does not exist.
Hi All Please help: I have installed drupal console as per all instructions I could get including at ( . when I issue an drupal command I get this error [ERROR] Class Drupal\Core\DrupalKernel does not exist. its been all day now and can't break thru'
Niels van Aken
@jmolivas Long time no seen, hope you're doing well? I've noticed our Drupal installations throwing a Package type "drupal-console-library" is not supported. My first action was Google'ing my way through this and could only find a issue in drupal-console-dotenv which seemed to line up with my problem, though I'm not sure how this package gets included in our projects. After some investigation, I'm pretty sure this is not included in our requirements or dependencies. Therefor, I'm now having the feeling that this is being thrown from our own drupal-console-library package, which hasn't been touched in ages. Do you know of any changes that would trigger this error?
I'm asking you specifically, since we've been talking multiple times about the drupal-console-library functionality in issues before.
André Angelantoni
@tekNorah did you solve that problem? I'm getting it, too.
Fabian Delgado
Hi, its possible install drupal console without use composer?
I've try with this (, but not work
Jason Paul Michel
Yesterday, I updated on contrib module via Composer, now I'm getting this error when I try to run drupal console commands
The "/pantheon-clone/web/vendor/drupal/console//config/services" directory does not exist.
Jason Paul Michel
Strange: apparently I added an empty composer.json in /root/web. This caused the error. Not sure why.
Kevin Kaland
Hmm, seems pretty dead here despite it being the official support channel on the GitHub site :/
Richard Allen

Hiya, wondering if anyone has any ideas what is going on here. We're doing a prototype, we have to use acquia hosting for it. We're using docker4drupal as a local, you can view here:

I'm trying to run drupal console commands in our docker containers. Getting the following errors, wondering if I'm using the root arg incorrectly or not understanding it?

docker-compose run --rm php drupal --root=./docroot/ site:status
[ERROR] Drupal Console is not installed at: "

You must execute the following composer commands:

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

sorry formatting was not working for some reason
Richard Allen
when all else fails...
docker-compose run --rm php docroot/vendor/bin/drupal --root=/var/www/html/docroot site:install --force --no-interaction
specify ALL the paths!
Hi I just started by trying to install Drupal, maybe it is a simple issue, but I see this error is not addressed.
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' in install_database_errors() (line 1164 of core/includes/
Hello all, does anyone have a solution for "Can only install one of: symfony/dom-crawler[4.0.x-dev, 3.4.x-dev]." when trying to install console with D8.8.5? Thanks
@welly you'll need to downgrade dom-crawler back to 3; check composer why-not symfony/dom-crawler:^3 to see if any dependency is preventing that. If there isn't anything, it might work if you remove the symfony/dom-crawler entry from composer.lock before running composer require drupal/console again.