-
Notifications
You must be signed in to change notification settings - Fork 51
The Drush launcher could not find a Drupal site #45
Comments
I have this problem too. I'm using this in a drupalvm installation. As a workaround, I'm now using drush global instead of drush launcher. But would be good to know why we're having this problem with drush launcher. |
This might provide some insight. It seems the problem is with using drush launcher on a non-Composer D7 project: #33 and webflo/drupal-finder#35 (this one seems to have the solution) |
#49 seems to have a fix too. |
I followed fix from above only to be met with a new error:
So it is clearly seeing that it's Drush 8, but that function is not available. |
Go to the Drupal's root directory, create a composer.json with below snippets and then execute composer.json
|
@shelane Did you ever find a fix for that error? |
I am using Docksal now and I don't have Drush Launcher installed locally. Everything I call is now in my container and I haven't had an issue. |
from the root directory run
|
This error also occurs when there is a syntax error in your composer.json. I had manually edited composer.json to remove the last required package but neglected to delete the trailing comma of the item that was now the last item in the list. Once I removed the comma Drush started working again. |
I had the same problem using drush v.8.3.2, using an older version worked for me (I used v.8.0.5)
|
Looks like the newer versions of DrupalVM specify the following in composer.json:
As we're still using Drupal 7 for the corporate site at this stage, we require an earlier version of Drush. This can be provided by changing the version requirements. E.g.
Once updated, |
For me it was an empty composer.json in the webroot that has been created when I accidentally required a package in there but quit before it finished. Removing the empty composer.json fixed it.
|
I'm having the same problem and none of these fixes are helping. ../../../vendor/drush/drush/drush status works just fine. drush status cannot find a drupal directory. I have this working on my old computer, having a hard time on a new machine. |
I was having the same problem after I set up a new drupal site on my local dev env. However drush launcher seemed to learn the location of the new drupal install after I ran |
You can use And as the previous comment said, I had the issue after updating my site to Drush 11, but once I updated the Drush Launcher using |
I think I have the same issue and need drush to run utf8mb4 conversion. I have a server that need to be able to use drush with old D7 and maybe later with newer Drupal versions in parallel. Previously I used https://github.com/webflo/drush-shim/releases/download/0.2.4/drush.phar and when I checked the https://github.com/webflo/drush-shim site for latest version I was redirect to drush-launcher. So I thought I need to use the one here as the old project is not reachable anymore and redirects. How can we solve this issue for D7 now? |
hm... I downloaded https://github.com/drush-ops/drush/releases/download/8.4.11/drush.phar and placed it in /usr/local/bin. Based on https://www.drush.org/latest/install/ latest Drush supported is 8.x. Why do we need drush-launcher project? I'm confused... |
There's some earlier comments that might be related to your issue. Read the README.md to understand the purpose of this project. |
I was getting the same error on D7 and #45 (comment) worked, thanks a lot. |
drush --debug
outputThe path
/var/www/html/debates/web/my-website
contains Drupal 7 installation. What shall I do???The text was updated successfully, but these errors were encountered: