Recently I made my Magento 2.3.1 website live and set mode as "production". Now If I try to run php bin/magento setup:di:compile
then it starts showing error
An error has happened during application run. See exception log for details.
In order to protect this I need to set Maintenance mode
and website goes offline. Is it anyway by which we can run php bin/magento setup:di:compile
and website will not show error.
Same thing happens during php bin/magento setup:upgrade
. It distorted the page layout.
Current application mode: production. (Note: Environment variables may override this value.)