-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You have requested a non-existent service "drush.service.consolecommands". #2767
Comments
Looks like you need Drupal 8.3.1 or up to let this error occur. |
Downgrading to drush 8.1.10 solves the problem. |
I can confirm this. I'm using drush 8.1.11, but I'm using Drupal 8.3.0 EDIT: And yes, downgrading fixed the issue |
Could someone try |
Doing a |
Just a suggestion for others coming across this: maybe Drush 8.1.11 is not the actual cause of the problem, but it just exposes existing weirdness with containers/autoloaders/drushs+library inconsistencies that was waiting to happen... Which makes it hard to trace. Question to anyone experiencing this: do you have a 'site-local' drush version installed? Two of our customers in the past week reported this problem. As it turns out, both of them
Apparently if you have a drush in your vendor/, you should really run that drush instead of whatever system-wide drush you have, otherwise: dragons. (I won't argue this point but will defer to https://pantheon.io/blog/trouble-two-autoloaders and https://pantheon.io/blog/avoiding-dependency-hell-site-local-drush.)
|
Haven't seen the missing vendor/bin thing before. If that's common, then maybe Drush should have a fallback check for vendor/bin/drush/drush/drush in the redispatch code, just in case. |
I was getting paranoid about this because I started seeing this in multiple places for different reasons. But it might be, for the most part, a wonky .gitignore with a missing "always include vendor/bin", that got distributed to multiple customers. I can't say. So - so far I am unable to 'prove' that this is more common, and the above note is just a hint for others to look in that direction and maybe share their experiences. |
I'm experiencing this issue right now on Acquia's PaaS with their default global drush (version 8.1.12). My site code does have a vendor directory with drush installed locally and available in vendor/bin. As a workaround for our deployment, we just use the drush executable from the local code and it works fine, not the one Acquia provides, but it would still be nice to get some resolution. |
Two followups: The missing vendor/bin thing was caused by two things:
I couldn't get answers to "why?", so I hacked a solution in this particular repo/build script already. I have no idea how many people redefine "bin-dir", so I won't advocate actively for having a fallback check for vendor/bin/drush/drush/drush in the redispatch code... maybe it's a good idea just in case. Miles' issue, and no doubt an issue for other Acquia customers, is that
So my questions are:
|
Please see #2843. This PR will be merged into master when ready. The general idea is that the alias code from this PR will be extracted into |
…rvices unless they exist in the container. This converts a crashing scenario into one where commands are merely missing. A 'drush cr' should bring back the missing commands.
Fixes #2767: Avoid 'non-existent service' error
Could folks who are experiencing this problem please try again with the latest HEAD from the 8.x branch? That PR converts this error from a crash to a situation where module commands will be missing. Only module commands implemented with annotations will be missing; that feature is uncommonly used right now, so I imagine most people will not realize it if they are having this problem. |
Just to say I'm having a drush freeze issue... I'm not an very skilled composer user, but my situation is like you are talking about... I have no idea what's happening... |
More info: this behavior is happening only with my user "joan" (was user who I managed to use a local drush 8.x globally). If I execute drush using sudo, it seems OK I've tryed creating a new user, with a clean /home/new_user folder, and I get the same error than with previous user... Only seems Ok with using sudo. |
By the way, drush launcher is not solving my issue :-( |
FYI: my issue has dissapeared using dev-master at composer.json: |
I can confirm that never ending redispatch notices are fixed in RC2 and can happen under some circumstances with RC1. |
See issue #2658
This occurs with drush 8.1.11
I opened a new issue since the other one is closed.
The text was updated successfully, but these errors were encountered: