문제

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.

도움이 되었습니까?

해결책

You have to run command

php bin/magento deploy:mode:set developer

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top