I am trying to install Lightning 8.1.0. I am currently at 8.1.00-rc5. When I run composer require drupal/lightning:8.1.0 I get the following response:

± |master ✓| → composer require drupal/lightning:8.1.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/1:  http://packagist.org/p/provider-latest$aa4f1da6acef0b15640bc1cace21327f5342dbb88c61b4605f0b1b0ff21d7399.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: drupal/entity_browser[8.1.x-dev, 8.1.0-alpha3].
    - Can only install one of: drupal/entity_browser[8.1.0-alpha3, 8.1.x-dev].
    - drupal/lightning 8.1.00 requires drupal/entity_browser 8.1.0-alpha3 -> satisfiable by drupal/entity_browser[8.1.0-alpha3].
    - Installation request for drupal/lightning 8.1.0 -> satisfiable by drupal/lightning[8.1.00].
    - Installation request for drupal/entity_browser (locked at 8.1.x-dev) -> satisfiable by drupal/entity_browser[8.1.x-dev].

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

The only way I get around this is that I have to remove the composer.lock file before I run composer require drupal/lightning:8.1.0. Does this sound like the right way to do it?

  • You only need to do composer require if you are adding a dependency to your application. You probably are thinking of composer update drupal/lightning:8.1.0 if I recall correctly.
    – mradcliffe
    Jun 23, 2016 at 20:26
  • If I run composer update drupal/lightning:8.1.0 I get Package "drupal/lightning:8.1.0" listed for update is not installed. Ignoring.
    – albertski
    Jun 23, 2016 at 22:16
  • 1
    Delete the lock file and run composer install again.
    – Eyal
    Jun 23, 2016 at 23:03
  • If the above doesn't work then you should attach your computer.json file above.
    – Eyal
    Jun 23, 2016 at 23:04
  • @Eyal I added links to the files.
    – albertski
    Jun 24, 2016 at 15:33

3 Answers 3


The way I updated is I manually updated composer and set Lightning to 8.1.0 and then ran composer update drupal/lightning.

  • This is the right way :)
    – Chapabu
    Jun 27, 2016 at 22:14
  • @Chapabu Do you think there is a way to do this via composer command? Some kind of force flag or something like that.
    – albertski
    Jul 12, 2016 at 17:04
  • If you set the version for Lightning to 8.1.* then running composer update will get the latest patch release if one is available.
    – Chapabu
    Jul 13, 2016 at 12:28
  • @Chapabu What about if I have the full version inside my composer file already. Reason I do that is that I want all my sites to always be at the same version.
    – albertski
    Jul 13, 2016 at 13:49
  • What do you mean you have the full version in your composer file already? If you change 8.1.0 to 8.1.* you'll still be getting the full version, it'll just be the latest patch release (depending on your minimum-stability).
    – Chapabu
    Jul 13, 2016 at 14:15

If you're dealing with a top level dependency, you can remove the old version and then install the new version:

composer remove drupal/lightning
composer require drupal/lightning:8.1.0
  • Oh yeah! I was simply trying to composer require provision-ops/yaml-tests to upgrade it and kept getting dependency issues even though that was the only package that was requiring things. Composer didn't tell me which package only that the problem package was "locked at 1.7.1" or something like that. Your technique worked! Aug 3, 2019 at 2:08

I had a similar case due to security reasons on a GitHub repository.

I solved updating the dependency to a specific version like this:

composer require phpseclib/phpseclib:2.0.31

If you are working with virtual environments like docker containers (ddev, lando, etc..) before running it you should connect to the container with a:

ddev ssh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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