i use magetno 2.2.3 . the bin/magento cli is working fine until I add a module by composer require [module name] --ignore-platform-reqs.after that it gives me a long term error :

enter image description here

so how should I add a module to Magento by the composer and don't get this error while using PHP bin/magento ... after that? and where is the problem of bin/magento with composer require ....?

1 Answer 1


Please make sure you are using composer 1 if not then download composer.phar file and run php composer.phar install and check if it runs smoothly. If this is done then run composer command php composer.phar require [module name] if you want then you can use --no-update followed by your command.

Happy Coding

  • thanks a lot. the problem was my composer version. but why Magento doesn't accept composer version 2 for installing modules? Jul 28, 2021 at 16:03

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.