Why isn't my composer installation working? 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 this message.


  [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] [--] [&lt;packages&gt;]...



So what is the problem here?
Composer seems to have installed properly, but I'm surprised these commands aren't working. Maybe it works and I'm not using it correctly.
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.