При установке модуля через Composer, выдает ошибку и откатывает файлы ./composer.json and ./composer.lock назад. Пишет Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Как побороть проблему, почему возникает?
Комментарии
А больше ничего не пишет?
Я думаю, что не все модули прописаны в ./composer.json может поэтому ругается. Некоторые модули пришлось устанавливать вручную, т.к. применял патчи, потом вручную заливал по ftp и включал. По-другому composer не хотел ставить, т.к. модуль не подходил под drupal 9.
https://drupal.ru/docs/veb-masteram-i-vladelcam-saytov/ustanovit-modul-c...
https://drupal.ru/comment/737694#comment-737694
А как можно вручную добавить модули в composer.json и composer.lock файлы? Должно помочь?
Можно вручную, а можно автоматически через composer require
Добавил вручную, там есть и свой 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.
У drupal/masked_input есть версия только для 8. Я чуть выше кидал ссылку как устанавливать модули для 8 на 9
А со своим модулем как быть? Он при обновлении его удалит, если его нет в списке composer.json?
Свой, в смысле кастомный? Если да, то его в композере вообще быть не должно, он должен лежать в папке /modules/custom и быть в git-репозитории
Спасибо большое. Очень помогли.