Fix composer.libraries.json

Created on 23 April 2025, about 1 month ago

Problem/Motivation

I tried to add the library repository in the composer.json file:

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "package",
            "package": {
              "name": "rubentd/gifplayer",
              "version": "dev-master",
              "type": "drupal-library",
              "extra": {
                "installer-name": "gifplayer"
              },
              "dist": {
                "url": "https://github.com/rubentd/gifplayer/archive/refs/tags/0.3.7.tar.gz",
                "type": "zip"
              },
              "license": "MIT"
            }
          }
    ],

And I got this error when trying to download the library:

$composer require gifplayer/gifplayer
In PackageDiscoveryTrait.php line 383:
                                                                                                                                                                                                           
  Could not find a matching version of package gifplayer/gifplayer. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stabi  
  lity (dev).                                                                                                                                                                                              
                                                                                                                                                                                                           

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

Steps to reproduce

Add the repository from the file composer.libraries.json in the composer.json and run

$composer require gifplayer/gifplayer

Proposed resolution

Fix the composer.libraries.json for both branches.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024