1

Right after installing magento, (2.3.2), I run

bin/magento deploy:mode:set developer

to enable developer mode. I remember when I had done before without setting this flag, the instance worked fine.

This command succeeded, but right after that, I am not even able to run any of the Magento commands.

Even the command to know the current status fails

>bin/magento deploy:mode:show 
Class Magento\Framework\App\ResourceConnection\Proxy does not exist

(since magento command itself is broken, di:compile or even turning off the developer mode will fail).

I could salvage the situation by copying the generated files from my another instance. But I am not sure why this happens and how to force it to regenerate the generated files.

Faisal Sheikh
1,3901 gold badge9 silver badges18 bronze badges
asked Sep 2, 2019 at 12:20

1 Answer 1

1

Run below commands from the Magento root terminal

cd <your Magento install directory>/var
rm -rf cache/* di/* generation/* page_cache/*
chmod -R 777 var/ pub/ generated/

Also, run the below commands from terminal:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
chmod -R 777 var/ pub/ generated/

Hope it helps!!!

answered Sep 2, 2019 at 12:28
9
  • I deleted them, but still bin/magento deploy:mode:show is not working. Commented Sep 2, 2019 at 12:30
  • Give permission to var, pub and generated folder with this command "chmod -R 777 var/ pub/ generated/" Commented Sep 2, 2019 at 12:31
  • thanks sumit, yes, I did that too. Setting to developer mode clearly deletes the generated folder, which seems to be needed for the magento tool itself to work. Commented Sep 2, 2019 at 12:32
  • Yes, you need to run the deployment commands again to make it work. I've updated my answer for the same. Commented Sep 2, 2019 at 12:36
  • This is what I meant @melchi - I've deleted my answer as Sumit's explains it better :P Commented Sep 2, 2019 at 12:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.