Composer Error for installation

Created on 2 December 2023, about 1 year ago
Updated 3 April 2024, 9 months ago

Problem/Motivation

1/ I have 2 websites in 1 shared hosting. Both sites are in different directories like /BLOG & /public_html.
2/ Drush & Composer are installed.
3/ When i try to install the module dependencies via Composer it always shows the same error. I tried many ways to do that.

Steps to reproduce

1/ login to my hosting via Putty
2/ run the composer command:

composer require 'drupal/upgrade_status:^4.0'

3/ I get the error:

./composer.json has been updated
Running composer update drupal/upgrade_status
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/upgrade_status, 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 for more details.
- It's a private package and you forgot to add a custom repository to find it

Read for further common problems.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

------------------------

Could you tell me is there something else required to complete the installation. I've made all the steps, but it looks like something is wrong. It doesn't allow to install 3.x or 4.x

Thank you

πŸ’¬ Support request
Status

Postponed: needs info

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡΄Norway gisle Norway

    Does your composer.json contain the following:

        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            }
        ],
    
  • Status changed to Postponed: needs info 10 months ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary
  • πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

    I think I may be running into a subtle variation of this. I ran my regular maintenance script and was surprised composer installed a dev version of Upgrade Status, while my version requirement is "^4.0.0". I thought I found the reason when I say that US's composer.json mentions minimum-stability: dev, but that has been there for the past 4 years... My root composer.json has minimum stability dev, which I suppose is the reason I do not get an error like the TS, but it is installing a dev version...

Production build 0.71.5 2024