1

I am using windows 10 and node js command prompt with latest composer version. The xampp already install with supporting magento2 PHP directives.

When i am trying to install a new magento 2 version 2.4.x and type the command this

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <mydirectory>

I got the following error:

Problem 1 - Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].

- magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

Problem 2 - Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].

- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

Problem 3 - laminas/laminas-dependency-plugin[1.0.0, ..., 1.0.4] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

- magento/product-community-edition 2.4.1 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.0, ..., 1.0.4].

- Root composer.json requires magento/product-community-edition 2.4.1 -> satisfiable by magento/product-community-edition[2.4.1].

Any ideas how to get solution around this?

2
  • Which composer version are you using? I think you should use composer version 1.
    – yvzyldrm
    Commented Jan 20, 2021 at 8:19
  • My composer version is latest 2.x. Commented Jan 20, 2021 at 10:00

1 Answer 1

6

You should use composer version 1.x.

Install latest release of version 1.x.

composer self-update --1

and you can try install magento.

If you want to return to Composer 2 again.

composer self-update --2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.