Magento 2 - There are no commands defined in the "setup" namespace on windows

  • I have a problem when I run this command:

    php bin/magento setup:upgrade

    Display error:

    There are no commands defined in the "setup" namespace.

    I found some answers but not in my case(I run in Windows 7 and Xampp).
    There are no commands defined in the “setup” namespace : Magento 2

    On frontend display:
    enter image description here Last time, I fixed is the system my pool code have errors with my module. And now I remove all my modules but error until display. Anyone used to fix this problem, Can you tell me how to fix this problem?

    When I run the command to install again composer, it returns error below:
    enter image description here

    check extensions, maybe missing module.xml file

  • Ryan Hoerr

    Ryan Hoerr Correct answer

    5 years ago

    Run this command:

    php bin/magento list

    When everything is working correctly, this should list out all of the possible commands in your Magento 2 command line interface. However, in the event that something is going wrong, this will also give you a much more descriptive error message about how and why it is failing.

    This could be the result of an invalid composer.json module file, among other things.

    See also:

    Thanks @Ryan. I tried many other answers, but yours helped me only.

    Thanks, for me it thrown even error in list command but later i realized there is folder right problem

    Great answer because it gives a more detailed error message. Was able to track down the issue after running this command.

    thanks it was helpful it showed some error instead of nothingness

    Thanks @Ryan above command helped us to identify the issue which went wrong

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used