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

webrant created an issue. See original summary.

damienmckenna’s picture

Category: Bug report » Support request
Priority: Critical » Normal

What version of Drupal are you using on the site?

mmjvb’s picture

Status: Active » Postponed (maintainer needs more info)

As you see below, both 5.0.0 and 5.0.1 are available.

docker@d92:/var/www$ composer show -a drupal/backup_migrate
name     : drupal/backup_migrate
descrip. : Backup and Migrate Drupal Module
keywords :
versions : 5.1.x-dev, 5.0.x-dev, 5.0.1, 5.0.0, 5.0.0-rc2, 5.0.0-rc1, 4.x-dev, 4.2.0, 4.1.0, 4.0.0, 4.0.0-rc1, 4.0.0-beta3, 4.0.0-beta2, 4.0.0-beta1, 4.0.0-alpha2, 4.0.0-alpha1, 3.x-dev, 2.x-dev, dev-5.1.x, dev-5.0.x, dev-4.x, dev-3.x, dev-2.x
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/backup_migrate
source   : [git] https://git.drupalcode.org/project/backup_migrate.git 79c28c31b9ad685601263e7e1db80e6360cc70e6
dist     : []
names    : drupal/backup_migrate

support
source : https://git.drupalcode.org/project/backup_migrate
issues : https://www.drupal.org/project/issues/backup_migrate
slack : https://drupal.slack.com/messages/C7C4M4QJV/details/

requires
drupal/core ^9

suggests
defuse/php-encryption Optional encryption of saved backups.
docker@d92:/var/www$

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`

webrant’s picture

Thanks 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.

damienmckenna’s picture

Also please check the repositories you have defined in the composer.json file, it should just work.

mmjvb’s picture

Using 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.

ivnish’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.