Open twhiston opened 8 years ago
@twhiston are you using DrupalComposer based project?
not directly, but it is our own composer based setup so its similar
I'm using php7 & I installed it via git clone and no errors
@twhiston This is not related to php7 is related to have two diff version of DC what is the version loaded on the site? since using the composer template
I think you may be right, as the composer version is @stable, but the global version was at 1.0.0-beta3. I'll test it again with both at the newest beta4 and see what happens
I'm getting this error when I try to run drush ... is console and drush not compatible?
Edit: I'm using composer based build that brings in the latest stable of console (beta5) and have drush 8.1.3 ... php7
I have same version on project and system (1.0.0-beta5), php7 and composer. Same error :/
Same issue here with:
"Drupal Console" version "1.0.0-beta5"
and
Drush Version : 8.1.3
with the following in composer.json:
"drush/drush": "~8.0",
"drupal/console": "~1.0",
First error was able to get past by:
That led to a new similar error with metatag which I was able to get it working by applying this patch to metatag (assuming you use that project):
"drupal/metatag": {
"Fix drush drupal console compatability error": "https://www.drupal.org/files/issues/metatag-deactivate_drupalconsole_services_0.patch"
}
Patch applied using:
"cweagans/composer-patches": "~1.0"
Seems like a bit of a workaround and goes against the recommendation to have both drush and drupal console in the composer.json, but allowed me to continue with module generation, config deployment, etc.
I'm still getting this issue where my global DrupalConsole version 1.0.0-beta5
is installed fresh today in ~/.console
but my project (drupal-project, running the latest Drupal 8.2.2) installed version 1.0.0-rc8
, but was installed exactly the same way:
$ composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
~/.console/composer.json:
{
"minimum-stability": "dev",
"require": {
"drupal/console": "~1.0"
}
}
How could it be that running the same command from two different folders could result in two different versions being installed?
Update 1: It seems that trying to require the specific latest version in my global install breaks due to some other requirement holding things back:
$ composer require drupal/console:1.0.0-rc8
./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
- Installation request for drupal/console 1.0.0-rc8 -> satisfiable by drupal/console[1.0.0-rc8].
- Conclusion: remove gabordemooij/redbean dev-master
- Conclusion: don't install gabordemooij/redbean dev-master
- drupal/console 1.0.0-rc8 requires gabordemooij/redbean ~4.3 -> satisfiable by gabordemooij/redbean[v4.3, v4.3.1, v4.3.2, v4.3.3].
- Can only install one of: gabordemooij/redbean[v4.3, dev-master].
- Can only install one of: gabordemooij/redbean[v4.3.1, dev-master].
- Can only install one of: gabordemooij/redbean[v4.3.2, dev-master].
- Can only install one of: gabordemooij/redbean[v4.3.3, dev-master].
- Installation request for gabordemooij/redbean (locked at dev-master) -> satisfiable by gabordemooij/redbean[dev-master].
Update 2: Removing vendor and composer.lock from my global and reinstalling fixed the issues for me:
$ cd ~/.console
$ rm -rf vendor composer.lock
$ composer install
@jameswilson You should install DrupalConsole per site executing this composer command from your site root.
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
If you want to have a global executable you can install the DrupalConsole Launcher using curl.
curl https://drupalconsole.com/installer -L -o drupal.phar
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
mv drupal.phar /usr/local/bin/drupal
@jmolivas thanks. Is there a way for console to somehow check for this kinds of condition where a global console is being run from one place but files from a different project-specific vendor folder load a different version, to give a more intelligent error warning message?
Warning: you're using Drupal Console version a.b.c installed in
/path/to/global/drupal
but this may with versionx.y.z
installed in/path/to/project/vendor/bin/drupal
Seems more sensible use priorities in this case local > global, anyway I encourage to stop using composer global, I hope this issue change your mind ... https://github.com/composer/composer/issues/5390
If I have a globally installed version of drupal console and am running PHP 7.0.8-4+deb.sury.org~trusty+1 I see the errors
However if i have a version of drupal console installed in my project, and use that instead commands all run correctly