I have problem when I run this command:
When running this commond after making custom modules.
php bin/magento setup:upgrade
I also try running the command.
sudo chmod -R 777 var pub
sudo php bin/magento setup:upgrade
But still gives same error.
-
share a screenshot of the command you are entering to get an idea of the location and exactly what you are trying.Dharam– Dharam2017年11月14日 09:11:33 +00:00Commented Nov 14, 2017 at 9:11
-
Please update the error you're gettingVivek Kumar– Vivek Kumar2017年11月14日 09:13:28 +00:00Commented Nov 14, 2017 at 9:13
-
I shared screnshot of my terminal.Hope you will getting exact bug.Anikesh Shahi– Anikesh Shahi2017年11月14日 09:23:35 +00:00Commented Nov 14, 2017 at 9:23
6 Answers 6
Run php bin/magento list command. It will listed all the magento 2 commands interface if everything working correctly. If something is going wrong, this will also give you error message that why it is failing.
You can check with https://magento.stackexchange.com/a/91696/1905 also.
-
I already apply this step.which are mentioned from previous occurs query .Anikesh Shahi– Anikesh Shahi2017年11月14日 07:28:40 +00:00Commented Nov 14, 2017 at 7:28
-
It may be due to folder permission of var and pub. Also check
chownpermission.Amit Maurya– Amit Maurya2017年11月14日 07:30:29 +00:00Commented Nov 14, 2017 at 7:30
Try this one :
php -f bin/magento setup:upgrade
-
Same error occurs, not changes something .Anikesh Shahi– Anikesh Shahi2017年11月14日 07:31:04 +00:00Commented Nov 14, 2017 at 7:31
-
Check module.xml file of your last installed extension. This error generally because of this file onlyzuber bandi– zuber bandi2019年04月25日 06:20:36 +00:00Commented Apr 25, 2019 at 6:20
Please check the path of command you entered. Also please try this sudo php bin/magento setup:upgrade
-
path is correct,that is magento root directory.Anikesh Shahi– Anikesh Shahi2017年11月14日 07:30:26 +00:00Commented Nov 14, 2017 at 7:30
empty var/generation and var/di. clear the cache.
check folder permissions and then run magento list.
if that gives a list of commands you can run setup:upgrade.
otherwise it should give an error you can post here.
I got this error for all commands in cli (not just setup) when I had a custom module that I was working on that didn't have a module.xml file. (More precisely, it did have one but I put it in the wrong place. :-/ )
If you're getting this while actively working on a module, check to see if your module's etc/module.xml is missing or unreadable or otherwise incorrect.
Check module.xml file of your last installed extension. This error generally occurs because of this file only.