2

I was trying to install some modules via Drush 9 (9.2.3) on a Drupal 8 (8.5.3) site and I keep seeing the following.

[error]  Unable to install modules devel due to missing modules devel. 


[error]  Unable to install modules devel due to missing modules devel. 

I was installing with the command:

drush en module_name

It is about as vanilla a site as you can get. I have barely started working on it.

How do I fix this?

5

Downloading contributed modules using Drush (9) has become deprecated. The recommended way to download modules (and themes) is with Composer. Assuming Composer is installed, you can add the contributed module to your project with composer require drupal/<module_name>.

Once the contributed module has been downloaded, you can enable it using drush en <module_name>.

  • Are you saying there is no way to use Drush to download modules any more, when did this happen? – tanbog May 14 '18 at 23:24
  • 1
    That happened in Drush 9. You can still use Drush 8 if you want to use that, but it's also disabled there by default – Berdir May 15 '18 at 7:22
  • So what if you do composer require drupal/<module_name>, it installs a tonne of stuff, then you do drush en <module_name> and it says Unable to install modules <module_name> due to missing modules <module_name>? – user568458 Aug 14 '18 at 5:40
  • @user568458 Where did Composer install/place the Drupal <module_name> module exactly? If it's in the vendor directory, you have to indicate in the composer.json that packages of the type 'drupal-module' should be placed in your modules folder. – Watergate Aug 14 '18 at 13:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.