2

I followed the instructions on docs.drush.org for installing Drush, proceeded by the recommended steps for installing Composer and a new Drupal 8 project. My project (cfbtv) is located at ~/sites/cfbtv and it appears the composer template (whatever that is) installed Drupal in the web directory.

When I try the recommended Composer commands they fail. composer update devel outputs the following:

Package "devel" listed for update is not installed. Ignoring.
Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update
Generating autoload files

When I run composer require devel, I get:

~/sites/d8-composer/web $ composer require devel

[InvalidArgumentException]
Could not find package devel at any version for your minimum-stability (stable).
Check the package spelling or your minimum-stability.

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

So what is the problem here? Composer seems to have installed properly, but I'm surprised these commands aren't working. Maybe it does work and I'm not using it correctly.

  • @kiamlaluno Is there a reason you keep changing my bash excerpts from code blocks to quotes? It just looks weird to me. – doub1ejack Mar 24 '17 at 12:28
  • Because it's a quote, not code. :) – kiamlaluno Mar 24 '17 at 14:20
3

As shown in the example reported in the documentation page you linked, you need to add drupal/ to the machine name of the module you want to install. The given example is exactly for the Devel module.

composer require drupal/devel:~1.0

The name of the packages handled from Packagist has the format vendor/package, so if you simply use the machine name of the module, Composer will not be able to find the package you meant.

Remember to run the commands from the directory containing the composer.json and the composer.lock files, not from the core directory.

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.