2

I recently switched to drupal_composer to manage my dependencies and updates. And so far I can really see the benefit of this work method, and highly encourage everyone to switch.

However, I tried installing the module Simple Oauth, but composer can't find it.

$ composer require "drupal/simple_oauth:^2.0-alpha4"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package drupal/simple_oauth could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

When browsing composer, nothing is found either.

$ composer browse drupal/simple_oauth        
Package drupal/simple_oauth not found
Invalid or missing repository URL for drupal/simple_oauth

Is this due to the alpha release not being published or something?

  • Is the drupal.org endpoint added in your main composer.json so these modules can be discovered? – Kevin Mar 13 '17 at 16:46
  • Yes. All other Drupal modules install just fine. It's just this one not working – pjcarly Mar 13 '17 at 20:33
2

It doesn't say the module was not found, it says there is no compatible version.

My composer version gives a much better error:

$ composer require "drupal/simple_oauth:^2.0-alpha4"
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)                          
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove drupal/core 8.2.3
    - Conclusion: don't install drupal/core 8.2.3
    - drupal/simple_oauth 2.x-dev requires drupal/core ^8.3 -> satisfiable by drupal/core[8.3.x-dev, 8.4.x-dev].
    - drupal/simple_oauth 2.0.0-alpha4 requires drupal/core ^8.3 -> satisfiable by drupal/core[8.3.x-dev, 8.4.x-dev].
    - Can only install one of: drupal/core[8.3.x-dev, 8.2.3].
    - Can only install one of: drupal/core[8.4.x-dev, 8.2.3].
    - Installation request for drupal/core (locked at 8.2.3, required as ~8.2.0) -> satisfiable by drupal/core[8.2.3].
    - Installation request for drupal/simple_oauth ^2.0-alpha4 -> satisfiable by drupal/simple_oauth[2.x-dev, 2.0.0-alpha4].

2.0-alpha4 requires Drupal 8.3. Leaving out the version specifier installs it as "1.0.0-beta5", which is however not listed anymore on the project page and therefore probably not really supported anymore.

8.3.0 will be released pretty soon, so if this is a new project, you could already switch to the recently released 8.3.0-rc1, there will likely only be very few changes until 8.3.0. See https://www.drupal.org/core/release-cycle-overview

| improve this answer | |

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.