I was tasked with the job of updating a Drupal site, as one often does when they work on Drupal sites. And I noticed that the Chosen module needed to be updated.
So I simply ran composer update drupal/chosen
and nothing updated!
Then I ran composer require drupal/chosen
. Which is what I do in composer update
doesn’t work. But I got the following message:
Your requirements could not be resolved to an installable set of packages. Problem 1 - drupal/chosen_lib 2.8.0 requires drupal/chosen 2.8.0 -> satisfiable by drupal/chosen[2.8.0] but these conflict with your requirements or minimum-stability. - drupal/chosen_lib 2.8.0 requires drupal/chosen 2.8.0 -> satisfiable by drupal/chosen[2.8.0] but these conflict with your requirements or minimum-stability. - drupal/chosen_lib 2.8.0 requires drupal/chosen 2.8.0 -> satisfiable by drupal/chosen[2.8.0] but these conflict with your requirements or minimum-stability. - Installation request for drupal/chosen_lib (locked at 2.8.0) -> satisfiable by drupal/chosen_lib[2.8.0]. Installation failed, reverting ./composer.json to its original content.
Solution
The solution is to run:
composer update drupal/chosen --with-dependencies
Take note of the --with-dependencies
at the end of the composer command.
Hope this post saves someone an hour’s worth of debugging.
At the solution code you wrote at the beginning “compose”, shouldn’t it mean “composer” instead?
Best regards
Phil
Hi Phil,
Good catch. Thanks for letting me know.
It’s been updated.
Cheers,
Ivan
Thank you! I had to update harvesthq/chosen to 1.8 to get mine to update, but I appreciate you sharing the tip — saved me some time for sure.
No problems.