• I made clone of Magento 2.2.4 Enterprise edition from Integration branch.
  • php version 7.1.23
  • Magento 2.2.4 Enterprise edition (Cloud)

On running command php bin/magento cache:flush

There are no commands defined in the “cache” namespace

I have tried

rm -Rf var/cache/*
rm -Rf var/generation/*

and this command working fine

php bin/magento
  • i ran that, and no error Oct 24, 2018 at 6:28
  • can you go through this one
    – Hitesh
    Oct 24, 2018 at 6:30
  • Try to run "setup:upgrade command, have got error like this There are no commands defined in the “setup” namespace? Oct 24, 2018 at 6:39
  • yes, i already did Oct 24, 2018 at 6:44
  • yes i refereed that @Hit's Oct 24, 2018 at 6:44

3 Answers 3


You have some error in your custom module. I have the same issue and it was due to issue in module.xml file. Can you please remove/disable your custom modules one by one to verify it.

  • Thanks for the answer +1 i will look in to that. Oct 24, 2018 at 6:44

Try the below, it should work.

  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy
  • php bin/magento cache:flush
  • thanks for the answer +1 for that, i already tried all above commands Oct 24, 2018 at 7:02

For find out problem you may go to your log file and you can check your error. or run setup:di:compile command to find out problem.

I think there is problem with your module.xml file in your any module. because there might be chance a mistake to write module name or setup version.

I hope it helpes!.

  • hahah :) compare your git file with any existing running enterprise cloud project. Oct 24, 2018 at 6:49
  • Try to run composer:update and check. Oct 24, 2018 at 6:57
  • already did that too Oct 24, 2018 at 7:02

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.