i have magento 2.2.3 . for deleting cache or enabling modules or any other usage of magento cli i take one error . it begins with this phrase

Unknown package has no name defined

and it is continuing with this long json terms error enter image description here

and at the end it finished with this

enter image description here

i get these long senetces error for any cli magento command . one told me to install baintree but i check this module .it was installed before. the instersting part is my project works in windows and it doesnt show me error on cli in windows os. but my server is linux and in docker container i run my same magento project and get error on CLI commands. how should i resolve that? my php version in both is same(linux and windows)

1 Answer 1


As you got the same PHP version and everything, i guess that you are just missing dependent vendor packages inside the linux docker container? Try composer install command in project root to fix it. Afterwards run the cli command again and it should work. Good luck

  • yes, u are right. cli works until I add a new package by composer require (package_name) --ignore-platform-reqs.. after that it gives me this error. how should I add a new module to Magento by the composer ? Commented Jul 27, 2021 at 14:02
  • Why do you use the flag --ignore-plattform-reqs while adding new composer packages? You should probably try to run it without the flag and everything should be fine regarding the cli. Alternatively you could also check the composer docs for further reference: getcomposer.org/doc/01-basic-usage.md. As is read out from there you first require a package afterwards you need to run composer update, so that you have the requirement inside the composer.lock file. Afterwards you run the composer install command that I mentioned above already.
    – Marco
    Commented Jul 28, 2021 at 15:47
  • thanks for helping. finally, I change my composer version to install dependencies. your speech guides me to think about my vendor packages. Commented Jul 29, 2021 at 1:29

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.