This error usually shows up when static content is not correctly generated by Magento. It can show also show up when using a vanilla Magento installation and is not necessarily related to a theme or installed extension.
In most cases, this error disappears once you setup the correct permissions and generate the static content for your store.
1. Correctly set Magento permissions by following the instructions under Basic Permissions Setup below:
2. Go to Developer mode and then to Production mode. This action performs a cache cleanup, compiles your code and generates the static content.
3. Generate static content for each locale if you are using a locale different to en_US (nl_NL, en_GB)
example: php bin/magento setup:static-content:deploy -f en_GB
If this doesn't help, there may be an additional issue related to the pub/static folders caused by the missing .htaccess file.
To fix this issue,
1. Go to file path
2. Check whether the
.htaccess file is available (hidden file - Press ctrl+H to view it).
3. If not available, based on the Magento version get the
.htaccess file in the file path
pub/static/and move it into your server.
4. Finally, clear your browser and Magento cache and check again.
Please sign in to leave a comment.