Score:0

Issues after updating Composer 2

in flag

I have been using drupal for over a month now. I am unable to install modules properly because of the composer 2 updating issues.

So far I have made the following changes while updating composer 2 "oomphinc/composer-installers-extender": "^2", "wikimedia/composer-merge-plugin": "^2", "drupal/core-composer-scaffold": "^8"

When I try composer update I get the following errors

Problem 1
    - acquia/lightning 4.1.11 requires drupal/lightning_media ^3.14 || ^4.1 -> satisfiable by drupal/lightning_media[3.14.0, ..., 3.x-dev (alias of dev-3.x), 4.1.0, ..., 4.x-dev (alias of dev-4.x)].
    - acquia/lightning[4.1.12, ..., 4.1.15] require drupal/lightning_media ^3.21 || ^4.6 -> satisfiable by drupal/lightning_media[3.21.0, 3.x-dev (alias of dev-3.x), 4.6.0, 4.x-dev (alias of dev-4.x)].
    - drupal/lightning_media 4.x-dev is an alias of drupal/lightning_media dev-4.x and thus requires it to be installed too.
    - drupal/lightning_media[dev-4.x, 3.15.0, 4.3.0, ..., 4.6.0] require drupal/slick_entityreference ^2.0 -> satisfiable by drupal/slick_entityreference[2.0.0-rc1, 2.0.0, 2.x-dev (alias of dev-2.x)].
    - drupal/slick_entityreference 2.x-dev is an alias of drupal/slick_entityreference dev-2.x and thus requires it to be installed too.
    - drupal/lightning_media 3.x-dev is an alias of drupal/lightning_media dev-3.x and thus requires it to be installed too.
    - drupal/lightning_media[3.14.0, 4.1.0, ..., 4.2.0] require oomphinc/composer-installers-extender ^1.1 -> found oomphinc/composer-installers-extender[v1.1, v1.1.1, v1.1.2] but it conflicts with your root composer.json require (^2.0).
    - drupal/lightning_media 3.16.0 requires drupal/slick 2.0 -> found drupal/slick[2.0.0] but it conflicts with your root composer.json require (^1.0.0).
    - drupal/lightning_media[dev-3.x, 3.17.0, ..., 3.21.0] require drupal/slick ^2.0 -> found drupal/slick[dev-2.x, 2.0.0-alpha1, ..., 2.x-dev (alias of dev-2.x)] but it conflicts with your root composer.json require (^1.0.0).
    - drupal/slick_entityreference[dev-2.x, 2.0.0-rc1, ..., 2.0.0] require drupal/slick ~2.0 -> found drupal/slick[dev-2.x, 2.0.0-alpha1, ..., 2.x-dev (alias of dev-2.x)] but it conflicts with your root composer.json require (^1.0.0).
    - Root composer.json requires acquia/lightning ~4.1.11 -> satisfiable by acquia/lightning[4.1.11, ..., 4.1.15].

And when I try to add composer require acquia/lightning

 Problem 1
    - Root composer.json requires oomphinc/composer-installers-extender ^2.0, found oomphinc/composer-installers-extender[2.0.0] but the package is fixed to v1.1.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  Problem 2
    - grasmash/drupal-security-warning is locked to version 1.1.1 and an update of this package was not requested.
    - grasmash/drupal-security-warning 1.1.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
  Problem 3
    - acquia/lightning 5.2.x-dev requires drupal/lightning_media ^4.6 -> found drupal/lightning_media[dev-4.x, 4.6.0, 4.x-dev (alias of dev-4.x)] but the package is fixed to 3.14.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - acquia/lightning 5.2.0 requires drupal/core ^9.2 -> found drupal/core[9.2.0-alpha1, ..., 9.3.x-dev] but it conflicts with your root composer.json require (^8.8.10).
    - Root composer.json requires acquia/lightning ^5.2 -> satisfiable by acquia/lightning[5.2.0, 5.2.x-dev].

Any suggestions would be much appreciated

cn flag
Upgrading to Composer 2 might take a little time, but since Lightning is EOL this year (https://www.acquia.com/blog/acquia-lightning-eol-2021-acquia-cms-future), I would stick with Composer 1 for now and make the switch to Composer 2 when you move away from Lightning.
Akshar Vijay avatar
in flag
@PatrickKenny Thanks how can I revert back to the previous version of the composer. I am using drupal for a about a month now. I understand that if I type the version of the composer it will . But I am unsure what version it was
cn flag
https://stackoverflow.com/questions/64597051/how-to-downgrade-or-install-a-specific-version-of-composer
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.