Css and js are returning with 404
enter image description here
Refused to apply style from 'https://domainnaime.com/pub/static/adminhtml/Magento/backend/en_US/jquery/uppy/dist/uppy-custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. I have checked all the htacess for each folders such as pub,media,static.
2 Answers 2
Try to run the following commands from the CLI and then check.
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
sudo chmod -R 777 var/ generated/ pub/
-
Did all the things also checked the secure and unsecure from the core_config_data.M2Dev– M2Dev2025年05月23日 11:00:48 +00:00Commented May 23 at 11:00
-
Yes, you need to check the proper URL are set there or not.Dhiren Vasoya– Dhiren Vasoya2025年05月23日 11:03:56 +00:00Commented May 23 at 11:03
Try deleting the pub/static and var/view_preprocessed folders:
rm -rf pub/static/*
rm -rf var/view_preprocessed/*
After the above, run CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
sudo chmod -R 777 var/ generated/ pub/