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.
Best Answer
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.