I installed this extension with the method on this page:
https://docs.ideal-postcodes.co.uk/docs/integrations/magento
The site was in production.
The compile command results in a critical error.
[2022-10-09 14:40:46] main.CRITICAL: Warning: include(/home/mysite/webapps/mysite/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in /home/mysite/webapps/mysite/vendor/magento/framework/View/Result/Page.php on line 327 {"report_id":"7473a776d64af485d73dce1512a4de37033e7b3037ee21d2e469a242c240abf1","exception":"[object] (Exception(code: 0): Warning: include(/home/mysite/webapps/mysite/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in /home/mysite/webapps/mysite/vendor/magento/framework/View/Result/Page.php on line 327 at /home/mysite/webapps/mysite/vendor/magento/framework/App/ErrorHandler.php:61)"} []
Only after finishing the deploy command does the error go away. And this whole process takes several minutes. So thats clearly not good at all.
When I put the site in developer mode I dont get the error.
So should I be in developer mode when running the module:enable, upgrade, compile and deploy commands?
Hello @infoamityw093d
Magento might not have generated the necessary static files, or they might be outdated. To regenerate them, follow these steps:
Clear the existing static content:
rm -rf pub/static/*
Check File Permissions:
find /home/mysite/webapps/mysite -type d -exec chmod 755 {} \; find /home/mysite/webapps/mysite -type f -exec chmod 644 {} \;
Clear Cache:
php bin/magento cache:clean php bin/magento cache:flush
Verify the view_preprocessed Folder:
rm -rf var/view_preprocessed/*
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9