Magento – Missing commands for Magento command line

command linemagento2

Whenever I run the common commands I get this and similarly named errors:

    [Symfony\Component\Console\Exception\CommandNotFoundException]  
  There are no commands defined in the "deploy:mode" namespace.

Im using Magento 2.2.5

Best Answer

For me, the resolution was to compile: bin/magento setup:di:compile. If that seems to do nothing or acts like it completes part of the way through, try increasing your memory limit: php -dmemory_limit=5G bin/magento setup:di:compile. Once I had compiled, I could set the deploy mode.

Related Topic