как установить commerceguys/intl library.

Главные вкладки

Лучший ответ

Аватар пользователя VasyOK VasyOK 25 февраля 2023 в 19:45

Почему вы дев версию ставите?
С последней официальной всего месяц прошел.
Скачал 2 файла отсюда https://github.com/drupal/recommended-project/tree/9.5.x (для Drupal 9.5).
Выполнил
composer install
Потом
composer require 'drupal/commerce:^2.33'
Все модули от которых commerce зависит установились. Ничего специально для этого не делал.
У вас composer 2й версии?
Выполните
composer --version

Комментарии

Аватар пользователя Riaron Riaron 22 февраля 2023 в 13:51

index.php drupal 10 находится в папке web
при вызове вашей каманы с папки web выдает:
C:\OSPanel\domains\mysite1.local\web> composer req drupal/commerce\
No composer.json in current directory, do you want to use the one at C:\OSPanel\domains\mysite1.local? [Y,n]? y
Always want to use the parent dir? Use "composer config --global use-parent-dir true" to change the default.

In PackageDiscoveryTrait.php line 361:

Could not find package drupal/commerce\.

Did you mean one of these?
drupal/commerce
drupal/commerce_cop
drupal/commerce_pos
drupal/commerce_knet
drupal/commerce_stock

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] [--sort-packages] [-o|--optimize-autoloader]

а при вызове с папки modules и mysite1.local пишет
C:\OSPanel\domains\mysite1.local\web\modules> composer req drupal/commerce
No composer.json in current directory, do you want to use the one at C:\OSPanel\domains\mysite1.local? [Y,n]? y
Always want to use the parent dir? Use "composer config --global use-parent-dir true" to change the default.
./composer.json has been updated
Running composer update drupal/commerce
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- drupal/commerce 2.0.0 requires drupal/core ~8.3 -> found drupal/core[8.3.0, ..., 8.9.20] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.1.0, ..., 2.4.0] require drupal/core ~8.4 -> found drupal/core[8.4.0, ..., 8.9.20] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.5.0, ..., 2.9.0] require drupal/core ~8.5 -> found drupal/core[8.5.0, ..., 8.9.20] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.10.0, ..., 2.14.0] require drupal/core ^8.6 -> found drupal/core[8.6.0, ..., 8.9.20] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.15.0, ..., 2.16.0] require drupal/core ^8.7 -> found drupal/core[8.7.0, ..., 8.9.20] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.17.0, ..., 2.18.0] require drupal/core ^8.7.7 || ^9 -> found drupal/core[8.7.7, ..., 8.9.20, 9.0.0, ..., 9.5.3] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.19.0, ..., 2.24.0] require drupal/core ^8.8 || ^9 -> found drupal/core[8.8.0, ..., 8.9.20, 9.0.0, ..., 9.5.3] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.25.0, ..., 2.28.0] require drupal/core ^8.9 || ^9 -> found drupal/core[8.9.0, ..., 8.9.20, 9.0.0, ..., 9.5.3] but the package is fixed to 10.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/commerce[2.29.0, ..., 2.33.0] require drupal/inline_entity_form ^1.0@RC -> found drupal/inline_entity_form[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
- Root composer.json requires drupal/commerce * -> satisfiable by drupal/commerce[2.0.0, ..., 2.33.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/commerce:*" to figure out if any version is installable, or "composer require drupal/commerce:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
PS C:\OSPanel\domains\mysite1.local\web\modules> cd ..
PS C:\OSPanel\domains\mysite1.local\web> cd

Аватар пользователя ivnish ivnish 22 февраля 2023 в 14:22

Riaron wrote: при вызове вашей каманы с папки web выдает:

А composer.json где лежит? Он должен быть в папке C:\OSPanel\domains\mysite1.local Оттуда и нужно запускать composer

Аватар пользователя Riaron Riaron 22 февраля 2023 в 14:12

при вводе composer require "drupal/commerce 2.x-dev" выдает следующее

Problem 1
- drupal/commerce dev-2.x requires drupal/inline_entity_form ^1.0@RC -> found drupal/inline_entity_form[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
- drupal/commerce 2.x-dev is an alias of drupal/commerce dev-2.x and thus requires it to be installed too.
- Root composer.json requires drupal/commerce 2.x-dev -> satisfiable by drupal/commerce[2.x-dev (alias of dev-2.x)].

Аватар пользователя VasyOK VasyOK 25 февраля 2023 в 19:45

Почему вы дев версию ставите?
С последней официальной всего месяц прошел.
Скачал 2 файла отсюда https://github.com/drupal/recommended-project/tree/9.5.x (для Drupal 9.5).
Выполнил
composer install
Потом
composer require 'drupal/commerce:^2.33'
Все модули от которых commerce зависит установились. Ничего специально для этого не делал.
У вас composer 2й версии?
Выполните
composer --version