I am working on trying to set up and learn drush for the first time on a Drupal 8.7.3 site on Aqui DevDesktop which i installed with composer. This is the first time I have tired composer, and drush is completely new to me. (I was really impressed with the efficiency of composer with installing modules BTW... I am a complete noob to this stuff and it was rather easy)
To get drush I followed the directions provided at: https://docs.drush.org/en/master/install/ and ran:
composer require drush/drush
which gave me drush 9.7.0
I am able to get the command line to recognize drush status from any directory:
drush status
Drupal version : 8.7.3
Site URI : http://default
PHP binary : C:\xampp\php\php.exe
PHP config : C:\xampp\php\php.ini
PHP OS : WINNT
Drush script :C:\Users\user\Sites\devdesktop\drupalup_comp\vendor\drush\drush\drush
Drush version : 9.7.0
Drush temp : C:\Users\user\AppData\Local\Temp
Drush configs :
C:/Users/user/Sites/devdesktop/drupalup_comp/vendor/drush/drush/drush.yml
C:/Users/user/Sites/devdesktop/drupalup_comp/drush/drush.yml
Drupal root : C:\Users\user\Sites\devdesktop\drupalup_comp/web
Site path : sites/default
The trouble I am having is the command line doesn't want to recognize commands relative to the site itself. The documentations says that drush should be run from:
vendor/bin/drush
but there is no drush directory folder just the file and application within the bin directory. (maybe that's my problem?)
For example when i run:
C:\Users\user\Sites\devdesktop\drupalup_comp\vendor\bin> drush en migrate_tools
I get:
"Command pm:enable was not found. Drush was unable to query the database.
As a result, many commands are unavailable. Re-run your command with --
debug to see relevant log messages."
I have run the --debug, but was not smart enough to make heads or tails of it :). I am way over my head here, so I hope I have provided enough info for this to make sense. From the little bit I have gathered this could be a path issue? Any pointers would be much appreciated!
PS: Composer installs modules like butter so quit crying about it and get with the times. If I can do it, you can too!!! :) :)