Unable to install with composer 2

Created on 20 February 2024, 7 months ago

Problem/Motivation

Hello!

When attempting to install the latest dev release of this module with Drupal 10 using composer 2, I am met with the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/drupal[8.4.0-alpha1, ..., 8.7.x-dev] require composer/installers ^1.0.24 -> found composer/installers[v1.0.24, ..., 1.x-dev] but it conflicts with your root composer.json require (^2.0).
    - drupal/views_mobile dev-3.x requires drupal/views-views * -> satisfiable by drupal/views-views[dev-3.x, 3.x-dev (alias of dev-3.x)].
    - drupal/views-views 3.x-dev is an alias of drupal/views-views dev-3.x and thus requires it to be installed too.
    - drupal/views_mobile 3.x-dev is an alias of drupal/views_mobile dev-3.x and thus requires it to be installed too.
    - drupal/views-views[dev-3.x, 3.x-dev] require drupal/core ~8.0 -> satisfiable by drupal/drupal[8.4.0-alpha1, ..., 8.7.x-dev].
    - Root composer.json requires drupal/views_mobile 3.x-dev -> satisfiable by drupal/views_mobile[3.x-dev (alias of dev-3.x)].

Steps to reproduce

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

Proposed resolution

I believe this is due to the dependency declared in the project .info.yml file:

dependencies:
  mobile_detect: 'mobile_detect:mobile_detect'
  views: 'views:views'

According to https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-abo... β†’ i believe this should be
drupal:views

Remaining tasks

  1. Update project info file
  2. Ensure installs cleanly on Drupal 10 with composer 2
  3. Verify functionality

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

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

Comments & Activities

Production build 0.71.5 2024