0

I'm trying to set up my work environment at home. I'm developing a drupal8 project and need to run with a vagrant. So far so good, installed of vagrant composer and php went well. Now I need to use drush to be able to rebuild my cache etc.

Here some more infos :

vagrant@lashootingboxd8:/var/www/drupalvm/drupal$ composer --version
Composer version 1.9.0 2019-08-02 20:55:32
vagrant@lashootingboxd8:/var/www/drupalvm/drupal$ composer --global require drush/drush
    1/1:        https://packages.drupal.org/8/drupal/provider-2019-3$3852c4e111957318dd45daf9d2d7b3ab725e924276f9288a039edfea6e7a8e56.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
    1/2:        http://repo.packagist.org/p/provider-latest$febfbf81e3ff08dabc4f583cddc865afb94c4c6c978e23baa7372527f0cbdf3a.json
    2/2:        http://repo.packagist.org/p/provider-2019-07$b9d9f8cb7e5d9896a78be68dec5d2d9e7ec04a5e5cc4d500f799d4cb8af75e4a.json
    Finished: success: 2, skipped: 0, failure: 0, total: 2


  [Symfony\Component\Console\Exception\RuntimeException]  
  The "--global" option does not exist

So if you guys have any idea of how to fix that would be awesome

EDIT : I did try the composer gloab require drush/drush, it doesn't give me an error but I still don't have anything as you can see below : (sorry I'm a very very noobie for this type of problem) enter image description here

  • `Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency.` Local dependency. See https://docs.drush.org/en/master/install/. – leymannx Oct 05 '19 at 11:44

2 Answers2

1

It's not a npm or yarn package manager. In composer you have to use as,
composer global require "laravel/installer=~1.1"
There is nothing like --global in composer.

Another thing, drush installed properly but it couldn,t find PATH.run command touch ~/. bash_profile and then put export PATH=$PATH:/Users/YOUR_USER_NAME/drush in there. Save, close and reopen the terminal.

Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81
0

Try composer global require drush/drush There is no --global flag

nixUser
  • 180
  • 1
  • 7