Unable to install automatically on Drupal 10 with Composer 2

Created on 26 February 2024, 4 months ago
Updated 27 February 2024, 4 months ago

Problem/Motivation

Hello!

When attempting to add this module to a new Drupal 10 codebase with Composer 2, I am met with the following error:

> composer require 'drupal/codemirror_field:^2.0'
./composer.json has been updated
Running composer update drupal/codemirror_field
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/codemirror_field ^2.0 -> satisfiable by drupal/codemirror_field[2.0.1].
    - drupal/codemirror_field 2.0.1 requires codemirror/codemirror5 ^5 -> 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 to its original content.

Steps to reproduce

  1. Create a new Drupal 10 project
  2. Try to install this module with composer

Proposed resolution

I believe we should be able to dynamically include the library via composer without needing the manual steps, see https://www.drupal.org/docs/8/modules/webform/webform-frequently-asked-q...

Remaining tasks

User interface changes

n/a

API changes

n/a

Data model changes

n/a

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States dan612 Portland, Maine

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024