Simple admin commands like “drush en” and “drush cc” result in “command pm (or cc) was not found. Drush was unable to query your database. As a result, many commands are unavailable.”
“drush status” works fine and shows the correct info. “drush (php version 8.3.14, the right site info, etc). “drush sqlc” connects to my site’s database (show tables shows the correct info).
“drush cc –debug” shows:
Exception trace:
at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/drush/drush/src/Application.php:233
DrushApplication->bootstrapAndFind() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/drush/drush/src/Application.php:185
DrushApplication->find() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/symfony/console/Application.php:266
SymfonyComponentConsoleApplication->doRun() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/symfony/console/Application.php:175
SymfonyComponentConsoleApplication->run() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/drush/drush/src/Runtime/Runtime.php:110
DrushRuntimeRuntime->doRun() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/drush/drush/src/Runtime/Runtime.php:40
DrushRuntimeRuntime->run() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/drush/drush/drush.php:140
include() at /Applications/XAMPP/xamppfiles/htdocs/drupal10/vendor/bin/drush.php:120
With “drush en mymodule” I expected the command to be executed. Via the site and admin account I can do the work but drush should be able to do this too.
Walfried Veldman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.