found enyo/dropzone[5.7.2] but it does not match the constraint

Created on 17 February 2023, about 2 years ago
Updated 22 February 2023, about 2 years ago

Problem/Motivation

Drupal 9.5.2. Dropzonejs 8.x-2.7 installed https://www.drupal.org/project/dropzonejs β†’ following the non-composer way (the composer ways didn't work).

I first tried the composer way #1, placing the lines below in my composer.json and running composer require wikimedia/composer-merge-plugin:

   "extra": {
        "merge-plugin": {
            "include": [
                "web/modules/contrib/dropzonejs/composer.libraries.json"
            ]
        }
    }

But, the dropzone library wasn't installed, so I just did it manually: Downloaded https://github.com/enyo/dropzone/archive/v5.7.1.zip and unzipped it to the libraries/dropzone folder. Successfully enabled DropzoneJS.

When I run composer require 'drupal/media_bulk_upload:^3.0' I get this composer error:

Problem 1
- Root composer.json requires enyo/dropzone ^5.9, 5.7.2, found enyo/dropzone[5.7.2] but it does not match the constraint.

What "constraint" do I need to look for? My "minimum-stability": "beta".

πŸ’¬ Support request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States somebodysysop

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

Comments & Activities

  • Issue created by @somebodysysop
  • πŸ‡ΊπŸ‡ΈUnited States somebodysysop

    I asked ChatGPT the very same question posted above. This was it's response:

    The error message indicates that the version of the Dropzone library you installed manually (v5.7.1) is not compatible with the version required by the "media_bulk_upload" package you're trying to install, which is between version 5.9 and 5.7.2.

    To resolve this issue, you have a few options:

    Upgrade the manually installed Dropzone library to a version that meets the requirements of the "media_bulk_upload" package, by either downloading a compatible version directly from the Dropzone repository on GitHub or using Composer to install a compatible version. To do the latter, you can add "enyo/dropzone": "^5.9" to your "require" section in your root composer.json file, then run composer update to install the latest compatible version of Dropzone.

    Downgrade the version of the "media_bulk_upload" package you're trying to install to a version that is compatible with the version of Dropzone you have installed. You can do this by running composer require 'drupal/media_bulk_upload:^3.0' --prefer-lowest to install the lowest possible version of the package that meets your requirements.

    Adjust the "minimum-stability" setting in your root composer.json file to "dev" or "alpha" to allow for the installation of more experimental packages and their dependencies. However, this is generally not recommended for production environments as it can lead to compatibility issues and instability.

    Once you have resolved the compatibility issue, you should be able to successfully install the "media_bulk_upload" package using Composer.

    Not quite.

    First off, I finally figured out that I need to download the "master" zip file from the GitHub DropZone project: https://github.com/dropzone/dropzone/tree/master

    Not sure if that is mentioned anywhere.

    Next, I needed to remove the DropZoneJS constraints added to composer.json when I tried installing Media Bulk Upload the "composer way #1".

    So, by manually installing the DropZone master zip file into the Drupal libraries/dropzone folder and then then re-installing DropZoneJS, I was finally able to install Media Bulk Upload.

    Thanks ChatGPT!

  • Status changed to Fixed about 2 years ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024