Question

I need to set the application mode to developer, but when I tried doing so I got the exception

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

Running bin/magento list, I notice that many of the commands that I need to use, including all deploy: commands do not show.

What can be the cause of this?

I am using Magento CE 2.1.3.

Was it helpful?

Solution

You have to run command

php bin/magento deploy:mode:set developer

OTHER TIPS

Some commands became available only after installation. The mentioned exception appears once you try to run such commands before installation.

Probably you missed installing Magento.

In my case I was setting up a new server and had copied the database over from a development site. Although I had an app/etc/env.php file and it was pointing at the correct db, it was missing the install/date timestamp config so Magento didn't know that the application had been installed and wasn't showing all the commands. Thanks to yaronishs answer I was able to figure this out, simply adding a timestamp to app/etc/env.php got all the expected commands running.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top