drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

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

Open KlemensHeinen opened this issue 10 years ago • 27 comments

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)

KlemensHeinen avatar Oct 02 '16 15:10 KlemensHeinen

I'm also encountering this.

jdleonard avatar Oct 03 '16 00:10 jdleonard

Same problem

eyudkin avatar Oct 03 '16 07:10 eyudkin

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.

robertloo avatar Oct 04 '16 05:10 robertloo

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

robertloo avatar Oct 04 '16 05:10 robertloo

@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 avatar Oct 04 '16 11:10 jmolivas

@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 avatar Oct 05 '16 21:10 whikloj

@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.

jmolivas avatar Oct 05 '16 23:10 jmolivas

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.

andydempster avatar Nov 10 '16 10:11 andydempster

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

jmolivas avatar Nov 10 '16 14:11 jmolivas

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.

siolfyr avatar Jan 20 '17 16:01 siolfyr

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

jmolivas avatar Jan 20 '17 16:01 jmolivas

Hi Guys,

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

Thanks, Queenie

queenielow avatar Jan 31 '17 04:01 queenielow

@queenielow what is the error you are getting?

jmolivas avatar Jan 31 '17 06:01 jmolivas

Hi Jmolivas,

My error are the same as robertloo.

Thanks

queenielow avatar Jan 31 '17 06:01 queenielow

@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

jmolivas avatar Jan 31 '17 06:01 jmolivas

Thanks alot @jmolivas .. It work!

queenielow avatar Jan 31 '17 10:01 queenielow

@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 avatar Feb 06 '17 10:02 tomasHegi

@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.

jmolivas avatar Feb 06 '17 15:02 jmolivas

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

jmolivas avatar Feb 06 '17 15:02 jmolivas

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

kentr avatar Feb 06 '17 15:02 kentr