Ошибка Composer

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

Аватар пользователя Babich Babich 7 октября 2021 в 11:24

При установке модуля через Composer, выдает ошибку и откатывает файлы ./composer.json and ./composer.lock назад. Пишет Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Как побороть проблему, почему возникает?

Лучший ответ

Комментарии

Аватар пользователя Babich Babich 7 октября 2021 в 12:08

Я думаю, что не все модули прописаны в ./composer.json может поэтому ругается. Некоторые модули пришлось устанавливать вручную, т.к. применял патчи, потом вручную заливал по ftp и включал. По-другому composer не хотел ставить, т.к. модуль не подходил под drupal 9.

Аватар пользователя Babich Babich 7 октября 2021 в 13:00

Добавил вручную, там есть и свой custom модуль.
Теперь пишет

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/modulename, it could not be found in an y version, there may be a typo in the package name.
Problem 2
- drupal/masked_input[dev-1.x, 1.1.0] require drupal/core ~8.0 -> found drup al/core[8.0.0-beta6, ..., 8.9.x-dev] but the package is fixed to 9.2.7 (lock fil e version) by a partial update and that version does not match. Make sure you li st it as an argument for the update command.
- drupal/masked_input 1.x-dev is an alias of drupal/masked_input dev-1.x and thus requires it to be installed too.
- Root composer.json requires drupal/masked_input ^1.1 -> satisfiable by dru pal/masked_input[1.1.0, 1.x-dev (alias of dev-1.x)].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min imum-stability setting
see for more det ails.
- It's a private package and you forgot to add a custom repository to find it

Read for further commo n problems.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and re movals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their orig inal content.

Аватар пользователя ivnish ivnish 7 октября 2021 в 13:19

Свой, в смысле кастомный? Если да, то его в композере вообще быть не должно, он должен лежать в папке /modules/custom и быть в git-репозитории