Problem/Motivation
Attempting to update to 2.0.13 with Drupal 10.3.2.
composer outdated shows
drupal/taxonomy_manager 2.0.12 2.0.13 This module provides a powerful interface for managing taxonomies.
but it does not update on composer update.
composer why-not drupal/taxonomy_manager 2.0.13 shows
There is no installed package depending on "drupal/taxonomy_manager" in versions not matching 2.0.13
composer require "drupal/taxomony_manager:2.0.13" --dry-run shows
./composer.json has been updated
Running composer update drupal/taxomony_manager
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/taxomony_manager, it 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.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Comments
Comment #2
jurgenhaasHitting the same issue. Declaring a dependency in composer.json which doesn't exist in a package manager is NOT a great idea.
The repository in this module's composer.json is not recognized by the root project. So, with the change introduced in #3449481: Install jquery.fancytree via Composer instead of CDN this module can only installed or updated when the root composer.json gets updated manually.
Please don't do that!
If you want to do this like the famous webform module, then you should introduce a separate composer.taxman.json or something similar, and declare the extra dependency and repository there. The readme should then explain how to make this work, like webform has done it as well.
Comment #3
nagy.balint commentedI can confirm. The latest version is not installable by composer:
It is likely a critical issue.
drupal/taxonomy_manager 2.0.13 requires jquery/fancytree ^2.38 -> could not be found in any version, there may be a typo in the package name.
Comment #4
rajab natshahComment #5
maxilein commentedSame here:
Comment #6
piratawww commentedSame here:
Comment #7
pahles commentedSame for me!
Comment #8
pgrandeg commentedThe same here. The problem is the package repository declaration is in the same commit has the dependency requirement, and composer is not able to read that.
As a workaround, you can implement this in your project's composer.json file "repositories" section:
And after that, you will be able to update as usual:
I hope it helps :)
Comment #9
alphex commentedConfirming that #8 solves the issue.
Comment #10
pahles commentedThat might work but it is not preferred. I should not have to change my projects composer.json.
Comment #11
la558 commentedthanks @pgrandeg for you suggestion in #8
Although that made the trick and I was able to upgrade taxonomy_manger to 2.0.13
when attempting to access any of the vocabularies in the "taxonomy manager' page, the site broke
"The website encountered an unexpected error. Try again later."
Watch dog shows:
So I had to roll back the recommended changes.
Comment #14
vladimirausComment #15
jannakha commentedthanks for the fix
Comment #17
vladimirausComment #18
torfjAfter updating the module to version 2.0.14, it can now be installed without modifying the root composer file. However, the fancytree is not displaying. I had to manually include the fancytree package in the composer file, as suggested here. It’s confusing that the fancytree package is listed as ‘suggested’ in composer when it is actually required for the module.
Comment #19
rajab natshahTor, Have a quick look at
#3467549: Change require custom libraries to suggestions as a better method with more options
Comment #20
vladimiraus@torfj yes, that was the way to make the release work.
You need to add library manually.
I'll update documentation and will checkout @rajab natshah task suggestion.
Comment #21
nagy.balint commentedWhat I did last time is that I left the CDN in the libraries.yml file, but then implemented a library_info_alter to check if the library is installed via composer and then use that instead.
This way the module works out of the box when installed, but also works if the library is manually installed via the composer repositories section.