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.
Comments
You need to be in anyname/web to run drush
That is what -Navigate to any .... is about. So, cd web
https://drive.google.com/file
https://drive.google.com/file/d/1Iwj_omVzHxiVO3j8gKrX-fMoEFM7bM7g/view?usp=sharing
What would you do with "web" ?
This now work fine.
This now work fine.
"site root, could try
vendor/bin/drush, as drush would be locally installed inside your project"