Drupal-console: [ERROR] Drupal Console is not installed at: /myD8Folder

Created on 2 Oct 2016  路  27Comments  路  Source: hechoendrupal/drupal-console

Outside any Drupal-Folder the console works fine.
Inside it throws this:
_[ERROR] Drupal Console is not installed at: /data/www/x8/
You must execute this composer command:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader_
This happens with a freshly downloaded (uninstalled) D8.
Besides: After executing the cmd, it works, but I dont want to have additional 8MB in my installation...

My System: Mamp, Drupal Console Launcher (1.0.0-rc2)

bug

Most helpful comment

But even when installing the global phar you still need to install DrupalConsole per site.

This is very unclear in the install instructions and throughout the documentation. I suspect that many people (like me) will assume this utility is similar to drush or composer in that you install once and use everywhere.

All 27 comments

I'm also encountering this.

Same problem

I get same error. It was working fine until I did a drupal self-update. Now I get this message

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install drupal/console 1.0.0-rc3
- Conclusion: don't install drupal/console 1.0.0-rc2
- Conclusion: don't install drupal/console 1.0.0-rc1
- Conclusion: don't install drupal/console 1.0.0-beta5
- Conclusion: don't install drupal/console 1.0.0-beta4
- Conclusion: don't install drupal/console 1.0.0-beta3
- Conclusion: don't install drupal/console 1.0.0-beta2
- Conclusion: don't install drupal/console 1.0.0-beta1
- Conclusion: don't install drupal/console 1.0.0-alpha2
- Conclusion: remove symfony/dom-crawler v3.1.5
- Installation request for drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0-alpha1, 1.0.0-alpha2, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5, 1.0.0-rc1, 1.0.0-rc2, 1.0.0-rc3].
- Conclusion: don't install symfony/dom-crawler v3.1.5
- drupal/console 1.0.0-alpha1 requires symfony/dom-crawler ~2.8 -> satisfiable by symfony/dom-crawler[2.8.x-dev, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9].
- Can only install one of: symfony/dom-crawler[2.8.x-dev, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.0, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.0-BETA1, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.1, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.10, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.11, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.12, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.2, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.3, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.4, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.5, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.6, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.7, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.8, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.9, v3.1.5].
- Installation request for symfony/dom-crawler (locked at v3.1.5) -> satisfiable by symfony/dom-crawler[v3.1.5].

Installation failed, reverting ./composer.json to its original content.

I tried to re-install using composer but I get same error.

composer global remove drupal/console
composer clearcache
composer global require drupal/console:@stable

@KlemensHeinen , @jdleonard , @tensor146 and @robertloo you will find an asnwer to this issue at this comment I did on a similar reported issue:

https://github.com/hechoendrupal/DrupalConsole/issues/2754#issuecomment-251361912

@jmolivas I have experienced the above error when installing drupal-console globally via the PHAR, then installing drupal 8 using drush. Then trying to use drupal-console in that drupal 8 install.

Is this not possible, or is there something I need to do?

EDIT

To clarify I mean is:

  1. Do I need to install drupal-console using composer (which seems to be the solution in the linked ticket) or can I still use the PHAR?
  2. Can I install drupal with drush and still use drupal-console, or do the two applications conflict in some way.

@whikloj:

1.- The phar is only a launcher tool to find and execute DrupalConsole.

2.- You can install both.

But even when installing the global phar you still need to install DrupalConsole per site.

But even when installing the global phar you still need to install DrupalConsole per site.

This is very unclear in the install instructions and throughout the documentation. I suspect that many people (like me) will assume this utility is similar to drush or composer in that you install once and use everywhere.

@BrizzleRocker Yes totally agree we need to make docs more clear. Any suggestions are more than welcome.

What was the benefit that made you decide to require Drupal Console to be installed on a per-site basis? This is going to cause more difficulties for people when installing, especially if they have conflicting packages.

What was the benefit that made you decide to require Drupal Console to be installed on a per-site basis?

@siolfyr you will find an answer to this question at this comment I did on a similar reported issue:

https://github.com/hechoendrupal/DrupalConsole/issues/2754#issuecomment-251361912

Hi Guys,

I have this error message too.. Was wondering has this resolve? or any solutions?

Thanks,
Queenie

@queenielow what is the error you are getting?

Hi Jmolivas,

My error are the same as robertloo.

Thanks

@queenielow can you try download DrupalConsole by executing

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update

By using the --no-update flag we are disabling the automatic update of the dependencies.

Finally just execute the following composer command to update project dependencies.

composer update

Thanks alot @jmolivas .. It work!

@jmolivas your solution is not working for me in Drupal VM. After I installed drupal/console via composer I get following error:
PHP Fatal error: Cannot use Drupal\Console\Core\Bootstrap\DrupalConsoleCore as DrupalConsoleCore because the name is already in use in /vendor/drupal/console/src/Bootstrap/Drupal.php on line 11

Anyway, I still didn't get it, why it's needed to install console on per-site basis.

@tomasHegi

Anyway, I still didn't get it, why it's needed to install console on per-site basis.

This was done to try to minimize dependency conflicts and support multiple releases of Drupal.

Not sure what your error I am currently using DrupalVM in some project without any issues.

@tomasHegi try instead running drupal from your site root directory vendor/bin/drupal

The line in @tomasHegi error report is just a use statement.

use Drupal\Console\Core\Bootstrap\DrupalConsoleCore;

I wonder if it's due to this PHP bug

Original mention here: http://stackoverflow.com/questions/17746481/cannot-use-x-as-y-because-the-name-is-already-in-use-even-though-its-not

@tomasHegi how did you installed the Launcher aka global executable?

@jmolivas thanks, using vendor/bin/drupal console works

@tomasHegi try reinstalling the global executable https://github.com/hechoendrupal/drupal-console#install-drupal-console-launcher

@jmolivas openned this issue https://github.com/hechoendrupal/drupal-console/issues/3181 regarding @tomasHegi issue...

https://github.com/hechoendrupal/drupal-console/issues/2751#issuecomment-277716314
quote : "@tomasHegi try instead running drupal from your site root directory vendor/bin/drupal"

This suggestion does not work.
Screenshot attach.
bug-drupal-root

EDIT:
Having said that; It is clear that drupal console is now (practically) not globally available. We are forced to install on every drupal project drupal console, if we want access to drupal console.

Step 1.

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update

Step 2.
composer update

Note:- Make sure run above command where composer.json located.
31902496-1b965244-b7f3-11e7-8939-f178b6f23665

@queenielow can you try download DrupalConsole by executing

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update

By using the --no-update flag we are disabling the automatic update of the dependencies.

Finally just execute the following composer command to update project dependencies.

composer update

Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings