1

I am facing some weird issue with Magento 2.2.5 version. When I first-time open website, I am getting lots of js errors. (Screenshot attached)

After this, when I only press F5 button (normal refresh) then the errors are gone. Again I pressed Control+F5 (Hard refresh), facing the same errors in console.

I have tried clearing cache, static content deploy, merging JS/CSS, 777 folder permission on var/* and pub/* but no luck.

Can anyone help me with this? enter image description here

0

Magento2 files & folders permissions are not intended to be such simple to work as it was Magento1, for instance. That 777 try is not a good idea

I'd take a look first at https://devdocs.magento.com/guides/v2.2/install-gde/prereq/file-sys-perms-over.html

Once you are sure that your working environment is correctly configured to host a Magento2 website, I'd repeat this command sequence (if you are working in production mode, if you are not then you can omit the static content deploy part)

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

That commands should generate all content the application needs to work & you can then assume that JS errors are not related to permissions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.