Problem/Motivation
Trying to install via command: composer require 'drupal/backup_migrate:^5.0'
Getting error, install fails.
Message:
./composer.json has been updated
Running composer update drupal/backup_migrate
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/backup_migrate, it could not be found in any version, there may be a typo in the package name.
Steps to reproduce
If I try composer show drupal/* -a drupal/backup_migrate does not show in the list of module repos
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
damienmckennaWhat version of Drupal are you using on the site?
Comment #3
mmjvb commentedAs you see below, both 5.0.0 and 5.0.1 are available.
Obviously, installation through Composer only works on a site to be managed with Composer. In order to be managed with Composer the minimum requirement is the repository definition for drupal extensions. The show command for drupal/* checks current installed drupal extensions, it doesn't check the repository for available extensions not already installed.
Doubt there is a problem with dependency information as it couldn't find the module in any version. Looks like your project is not ready to be managed through Composer.
Which version of Composer do you use?
What output do you get on `composer show -a drupal/backup_migrate`
Comment #4
webrant commentedThanks for the quick response. Using Drupal 9.3.11
composer show -a drupal/backup_migrate
outputs:
[InvalidArgumentException]
Package "drupal/backup_migrate" not found, try using --all (-a) to show all available packa
ges.
But, for example, if I run composer show drupal/* -a I get a full list:
drupal/arch
drupal/at_base
drupal/cacheable_types
drupal/clean_package
drupal/coder
drupal/commerce_taxcloud etc.
I agree this may be an issue with the composer (version 2.2.12) install since it's on a bluehost server. I'll review requirements.
Comment #5
damienmckennaAlso please check the repositories you have defined in the composer.json file, it should just work.
Comment #6
mmjvb commentedUsing Drupal 9.3.12, but don't think that is relevant to this issue. Running Composer 2.2.6 and updated to 2.3.5. Both see the releases.
Confused myself about output `composer show -a drupal/*`, similar to yours. Looks like it goes to the repository. But the output doesn't really make sense.
Try `composer clearcache` or the -vvv to make sure it gets the information.
Comment #7
ivnish