Drupal-console: I can't run commands on RC24

Created on 16 Jul 2017  路  14Comments  路  Source: hechoendrupal/drupal-console

I can't run commands on RC24

Problem

With the last release (RC24) all commands return this error:

[Symfony\Component\Console\Exception\InvalidArgumentException]
Command name "" is invalid.

In others projects with RC23 all is working

How to reproduce

1.- Execute
composer create-project drupal-composer/drupal-project:8.x-dev project.dev --prefer-dist --no-progress --no-interaction

  1. Try any command

Details to include:

  • Drupal versi贸n: 8.3.5
  • Console version: 1.0.0-rc24
  • Console Launcher version: 1.0.0-rc24

Most helpful comment

@Narretz I was testing this with @betoquiroga and we found the fix try this:

drupal init --override

To test change directory to your site and drupal list

If that does not work then try removing the global console directory (backup if you make changes to any of those files)

rm -rf `~/.console`

To test change directory to your site and drupal list

If that does not work you may have a config directory at the root of your site /path/to/site/console try the same approach override and delete directory as last resort.

II will try to detect which configuration is causing issue, but in the meantime we found override and/or delete have this issue fixed.

All 14 comments

@betoquiroga which OS and PHP version are you using?

MacOS Sierra 10.12 & PHP 5.6.30

@betoquiroga I tested rc24 on my local and it works fine

Alt text

I updated my OSX to 10.12.5and rc24 works as expected
Alt text

I also tested on a new DrupalVM and rc24 it works fine
Alt text

Same here for me. I'm on Windows 10 with php 5.6.23 and I'm accessing drupal like this: vendor/drupal/console/bin/drupal Always gives me

  [Symfony\Component\Console\Exception\InvalidArgumentException]
  Command name "" is invalid.

Started with rc.24. .rc25 is broken, too. rc.23 works

@Narretz I was testing this with @betoquiroga and we found the fix try this:

drupal init --override

To test change directory to your site and drupal list

If that does not work then try removing the global console directory (backup if you make changes to any of those files)

rm -rf `~/.console`

To test change directory to your site and drupal list

If that does not work you may have a config directory at the root of your site /path/to/site/console try the same approach override and delete directory as last resort.

II will try to detect which configuration is causing issue, but in the meantime we found override and/or delete have this issue fixed.

Blowing away ~/.console fixed it for me (rc25, linux, php 7.0)

@jmolivas Thanks, I emptied .console in my user folder (on Windows) and now it works. I can't use drupal directly in my project folder, though (always have to use vendor/drupal/console/bin/drupal but I assume that's a different issue.

@Narretz Did you installed the Launcher?
https://docs.drupalconsole.com/en/getting/launcher.html

It works for me after removing the global console directory. Thanks (rc25, PHP 7.0.15-0 ubuntu0.16.04.4 )

Closing this one. Feel free to re-open if still happening after applying the fix.

OK, This is fixed by removing the ~/.console seems that earlier versions initialization was still exists and unable to continue current one, this is php-7.2-RC

Removing ~/.console fixed it.

Was this page helpful?
0 / 5 - 0 ratings