- Issue created by @hockey2112
- π§πͺBelgium mgstables
In composer.json:
"require": { "php": ">=7.0 || >=8.0", "drupal/core": "^9 || ^10", "sachinchoolur/lightgallery": "^1.2.21" }
I think it should be:
sachinchoolur/lightGallery"require": { "php": ">=7.0 || >=8.0", "drupal/core": "^9 || ^10", "sachinchoolur/lightGallery": "^1.2.21" }
- π¦πΉAustria dv@blinker.digital
I get the following error when trying to include sachinchoolur/lightGallery :
Problem 1 - Root composer.json requires drupal/lightgallery ^1.4 -> satisfiable by drupal/lightgallery[1.4.0, 1.x-dev]. - drupal/lightgallery[1.4.0, ..., 1.x-dev] require sachinchoolur/lightgallery ^1.2.21 -> could not be found in any version, there may be a typo in the package name.
Somewhere there's a typo and it's interfering with dependencies.
- Status changed to Needs review
10 months ago 1:28pm 5 February 2024 - πΊπ¦Ukraine paulrad
The issue is caused by the fact that
sachinchoolur/lightGallery
library is not being considered as a package.
To resolve it - you need to install the library first and then proceed to the module installation.Patch with updates on the installation process in the README.md applied.
Here's the console results after proposed resolution:
$ composer require 'drupal/lightgallery:^1.4' ./composer.json has been updated Running composer update drupal/lightgallery Gathering patches for root package. Loading composer repositories with package information Updating dependencies Lock file operations: 1 install, 0 updates, 0 removals - Locking drupal/lightgallery (1.4.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 1 install, 0 updates, 0 removals Gathering patches for root package. Gathering patches for dependencies. This might take a minute. - Installing drupal/lightgallery (1.4.0): Extracting archive Generating autoload files 90 packages you are using are looking for funding. Use the `composer fund` command to find out more! phpstan/extension-installer: Extensions installed
- π§πͺBelgium mgstables
Same problem, "sachinchoolur/lightgallery" cannot be found by composer
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires sachinchoolur/lightgallery, it could not be found in any version, there may be a typo in the package name. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
If I change to "sachinchoolur/lightGallery" then composer has a problem with the uppercase letter.
require.sachinchoolur/lightGallery is invalid, it should not contain upperc ase characters. Please use sachinchoolur/lightgallery instead.
You can only install the "light gallery plugin" manually and therefore it is best to extract it from the "required" in the composer.json file supplied with the module.
- πΊπΈUnited States mortona2k Seattle
I don't think the new instructions in the patch are right.
The sachinchoolur/lightgallery package does not need to be installed first, but you need to have the repository defined in your root composer.json so composer can find it when installing drupal/lightgallery.
The lightgallery module requires "sachinchoolur/lightgallery": "^1.2.21", which is the latest 1.2 release.
This version is way behind, but probably the one to stick to unless later versions have been tested.
The readme has notes for adding the repository, but the version is wrong.
If you add the repository to your composer.json with version 1.2.21, it works.
"repositories": [ { "type": "package", "package": { "name": "sachinchoolur/lightgallery", "version": "<strong>1.10.0</strong>", "type": "drupal-library", "source": { "url": "https://github.com/sachinchoolur/lightGallery", "type": "git", "reference": "<strong>1.10.0</strong>" } } } ]
I think the best way to handle this is to add the repository to the composer.json. Is that not allowed?
If not, just updating the readme instructions with the version number is a big help.
- πΊπ¦Ukraine vasyok
Thanks, mortona2k!
change"repositories": [{ "type": "composer", "url": "https://packages.drupal.org/8" }],
to
"repositories": [{ "type": "composer", "url": "https://packages.drupal.org/8" }, { "type": "package", "package": { "name": "sachinchoolur/lightgallery", "version": "1.2.21", "type": "drupal-library", "source": { "url": "https://github.com/sachinchoolur/lightGallery", "type": "git", "reference": "1.2.21" } } } ],
then command
composer require 'drupal/lightgallery:^1.4'
work properly - π§πͺBelgium ehanuise
Had the same issue, solved by adding VasyOK's changes to the composer.json.
- π¨πSwitzerland titouille
Thanks @VasyOK for the tip, working perfectly.
- Status changed to RTBC
4 months ago 6:48pm 13 July 2024 - π§π·Brazil murilohp
Thanks for the explanation @mortona2k and for the documentation! @paulrad, thanks for the patch, but as pointed by @mortana2k, you just need the package defined on your repositories section.
-
murilohp β
committed 5666f793 on 8.x-1.x
Issue #3348302 by mortona2k, murilohp: Drupal 10 version not installable...
-
murilohp β
committed 5666f793 on 8.x-1.x
- Status changed to Fixed
4 months ago 6:52pm 13 July 2024 - π§π·Brazil murilohp
Reviewed and commited the changes to the README.md, thank you all!
Automatically closed - issue fixed for 2 weeks with no activity.