I have been using Drush for while, but now I constantly cannot run Drush on Teminal.

So for example, start a new site:

  - composer create-project drupal/recommended-project:~9.0 anyname (Fine)

  - cd "/Users/david/Sites/anyname" && composer require drush/drush (Fine)

Then running

  - drush site-install standard --db-url=mysql://root:root@localhost/anyname --site-name=AnyName

Will get an error......

The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:

  - Navigate to any where within your Drupal project and try again.

  - Add --root=/path/to/drupal so Drush knows where your site is located.

I have tried numerous times to fix this, also working with ‘/David/‘ I also get the error on all ‘/David/’ site.

(Mac/Terminal)

Thanks.

|  Terminal Drush  |

|  Terminal .Bash_profile  |

Comments

mmjvb’s picture

That is what -Navigate to any .... is about. So, cd web

davidd07’s picture

davidd07’s picture

This now work fine. 

"site root, could try vendor/bin/drush, as drush would be locally installed inside your project"