Failed to extract bower-asset/photoswipe

Created on 21 October 2023, 9 months ago
Updated 25 April 2024, 2 months ago

I installed the PhotoSwipe plugin version 5.x using composer. I first followed the tutorial here β†’ and proceeded with the necessary commands:

  • composer require 'drupal/photoswipe:^5.0@alpha'
  • composer require bower-asset/photoswipe:^5
  • composer require npm-asset/photoswipe-dynamic-caption-plugin:^1.2

This is my composer.json file (short version, I left some modules irrelevant to the issue):

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 9 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ],
    "require": {
        "bower-asset/photoswipe": "^5",
        "composer/installers": "^1.9",
        "drupal/core-composer-scaffold": "^10",
        "drupal/core-project-message": "^10",
        "drupal/core-recommended": "^10",
        "drupal/photoswipe": "^5.0@alpha",
        "npm-asset/photoswipe-dynamic-caption-plugin": "^1.2",
        "oomphinc/composer-installers-extender": "^2.0"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "oomphinc/composer-installers-extender": true
        }
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-types": [
            "npm-asset",
            "bower-asset"
        ],
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library",
                "type:npm-asset",
                "type:bower-asset"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        }
    }
}

When running composer update I get the error:

Failed to extract bower-asset/photoswipe: (1) '/usr/bin/unzip' -qq '/Users/Bram/Sites/website/vendor/composer/tmp-03e6b569838484dd86f1cb6ca068cf63.zip' -d '/Users/Bram/Sites/website/vendor/composer/475191c8'

replace /Users/Bram/Sites/website/vendor/composer/475191c8/dimsemenov-PhotoSwipe-03eab19/.github/funding.yml? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
(EOF or read error, treating as "[N]one" ...)

The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class

The module is working fine but I wonder why this error is thrown.

Any idea what's wrong with my setup?

πŸ’¬ Support request
Status

Postponed: needs info

Version

5.0

Component

Documentation

Created by

πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

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

Comments & Activities

  • Issue created by @bramvandenbulcke
  • Status changed to Postponed: needs info 8 months ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @bramvandenbulcke looks like you just have to confirm the given message, as you may have an older version in place that needs to be replaced?

  • πŸ‡§πŸ‡ͺBelgium bramvandenbulcke

    The script didn't show an option to confirm. It ends with the error.

    In the end all my scripts are in place and when I run composer update again, the error isn't shown anymore.

    But it's possible others will encounter the issue and maybe there is some explanation for it.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL

    I guess then your script skips the question for some reaons.

    But this is not this module's fault or something we can influence. Typical composer behavior for git assets that changed locally / differ from remote.

  • πŸ‡ΊπŸ‡ΈUnited States fsabbagh

    @Anybody β†’ or bramvandenbulcke β†’ were you able to get around this? Having the same issue now.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @fsayoub for us it's working flawlessly since months. I guess this must be local reasons or composer version or configuration or something like that? Any feedback from the others?

  • πŸ‡ΊπŸ‡ΈUnited States fsabbagh

    These are the current versions I have:

    "bower-asset/photoswipe": "^5"
    "dimsemenov/photoswipe": "^5.4"
    "drupal/photoswipe": "^5.3"
    "npm-asset/photoswipe-dynamic-caption-plugin": "^1.2"

    I get an error on the status report:
    Local library folder found, but library seems to be corrupted, please require the photoswipe library correctly!

    @Anybody β†’ @bramvandenbulcke β†’

Production build 0.69.0 2024