The library is not downloading when installing the module with the composer.

Created on 6 June 2024, 22 days ago
Updated 21 June 2024, 7 days ago

Problem/Motivation

The library is not downloading when installing the module with the composer.

Steps to reproduce

Install module with composer.

✨ Feature request
Status

Active

Version

10.0

Component

Code

Created by

🇮🇳India ravi kant Jaipur

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

Comments & Activities

  • Issue created by @ravi kant
  • 🇮🇳India dev16.addweb

    I have created composer.json for download library, It is downloaded in

    elevate_image_zoom/vendor/elevateweb/elevatezoom# ls
    jquery.elevatezoom.js

    Can we change path of this library in elevate_image_zoom.libraries.yml,

    Created composer.json -->

    {
        "name": "drupal/elevate_image_zoom",
        "description": "Zoom image integrating ElevateZoom library",
        "type": "drupal-module",
        "license": "GPL-2.0-or-later",
        "repositories": [
          {
            "type": "package",
            "package": {
              "name": "elevateweb/elevatezoom",
              "version": "1.0.0",
              "type": "drupal-library",
              "dist": {
                "url": "https://raw.githubusercontent.com/elevateweb/elevatezoom/master/jquery.elevatezoom.js",
                "type": "file"
              }
            }
          }
        ],
        "extra": {
          "installer-paths": {
            "web/libraries/{$name}": ["type:drupal-library"]
          }
        }
    }
    
  • 🇮🇳India ravi kant Jaipur

    @silvi.addweb
    Libraries should be install on root path web/libraries

    Create MR of your changes.

  • 🇮🇳India dev16.addweb

    Hi, While I run composer require elevateweb/elevatezoom inside elevate_image_zoom module, I am not able to download in web/libraries,
    Currently Library is download in module's vendor directory, Even I am not able to run composer require elevateweb/elevatezoom on root as root composer not getting this package.

  • 🇮🇳India ravi kant Jaipur

    The command for install this module is composer require drupal/elevate_image_zoom

  • 🇮🇳India dev16.addweb

    Hi,
    I have found an alternative solution. This patch wasn't download library via Composer, but it might still be helpful. If it looks good, we can proceed to create a merge request for this patch.

Production build 0.69.0 2024