Magento – Javascript errors, only sometimes

javascriptmagento2

The website is throwing a bunch of javascript errors. They are the kind that look like jquery was not loaded properly. These errors don't happen 100% of the time though. I don't understand requirejs enough to understand what is going on.

Example of JS errors

This is running Magento 2 and the Pearl theme by WeltPixel.

Not sure what else would be useful, should I post the source code of the page?

Best Answer

This error is returned if you do not have permissions and/or static content is not generated.

You have to run the commands

php bin/magento cache:clean && php bin/magento cache:flush

and

php bin/magento setup:static-content:deploy 

and make sure the permissions (777) are ok on /pub/static/frontend, the command of permission is:

chmod -Rf 777 pub/static/frontend

Yesterday was released a new release of Pearl theme, you can update the theme.

Related Topic