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

  There are no commands defined in the "deploy:mode" namespace.

Im using Magento 2.2.5

  • In terminal other command work like cache clear and indexing ? – Feedlay Technologies Aug 9 '18 at 5:06

Try by enabling developer mode

php bin/magento deploy:mode:set developer


Run Following steps to check & then try again:

  1. Run “composer install” in magento root
  2. please use the -v or -vv option in the command line for debug information.
  3. If an extension has no etc/module.xml file then bin/magento fails.
  4. If a composer.json has a syntax error.

I hope it helps!


It might be a permission issue. You can run these commands under your Magento directory :

sudo chmod 775 -R ./generated/ ./var/ ./pub/

  • It did not. I got this error: [Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "deploy:mode" namespace. – Matthew McLennan Aug 8 '18 at 19:12
  • @MatthewMcLennan i updated my answer , you can check it – sami23 Aug 8 '18 at 19:32
  • Never give permission like above,because it should be like sudo chmod 777 -R var/ – Jaisa Dec 14 '18 at 7:25
  • Please put slash after var. don't use it before – Jaisa Dec 14 '18 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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