The latest Drush 9.x version recommends that Drupal 8 sites will be built using Composer, with Drush listed as a dependency. However, when you install Composer and Drush globally per step #1 on http://docs.drush.org/en/master/install and then proceed to step #2 Installing Drush Launcher and then try to run Drush on a pre-existing Drupal website (e.g. drush --version
), then you will get:
Drush Launcher Version: 0.6.0
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.
How do I get around this problem, and make Drush work with pre-existing Drupal sites?