I'm working on a legacy project and am trying to see if Drush can be set up properly. I installed the drush executable locally, I'm not sure if that is the issue. But when I go to run a basic command like drush cr I get this error about "environment settings."

$ /home/ubuntu/.config/composer/vendor/drush/drush/drush cr
environment settings not found or configured for Drush command terminated abnormally due to an unrecoverable error.

Where are these "environment settings" supposed to be located? Googling around, I can't seem to find anything concrete. Any suggestions would be appreciated.

By the way, the executable itself seems okay:

$ /home/ubuntu/.config/composer/vendor/drush/drush/drush --version
 Drush Version   :  8.2.3
  • Try with the debug flags (.../drush cr -vvv), that should give more info
    – Clive
    Mar 25 '21 at 19:34
  • What version of Drupal? You installed Drush globally? This install method is not supported anymore. Also see the compatibility chart drush.org/latest/install/#drupal-compatibility
    – leymannx
    Mar 25 '21 at 20:15
  • @leymannx Drupal version 8.5.14 I think. It's a legacy project, so I don't have much leeway to upgrade. Mar 25 '21 at 20:57
  • Is the problem resolved? Since you have Drupal 8.4+, you should use Drush 9 - ref chart leymannx linked to.
    – hansfn
    Apr 6 '21 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.