Skip to content

Composer install throws error when a package from composer.libraries.json is updated #274

@omarlopesino

Description

@omarlopesino

Problem

I have a project that requires vakata/jstree library via composer-merge-plugin: https://git.drupalcode.org/project/media_directories/-/blob/2.1.x/composer.libraries.json?ref_type=heads#L13

The problem I have is that the library has been updated from 3.3.16 to 3.3.17. When I try to deploy this, I get the following error:

- Required package "vakata/jstree" is in the lock file as "3.3.17" but that does not satisfy your constraint "3.3.16". This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.

It looks like composer is having a conflict between the .lock version and the .libraries.json version.

Steps to reproduce

  • Initially, setup a proejct with vakata/jstree required via drupal/media_directories and composer-merge-plugin with version 3.3.16
  • Upgrade drupal/media_directories and push all the changes.

After this, trying to pull these changes in deployments / branch change, and doing composer install will throw the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions