enter image description hereI m using Magento 2.1.9 for my application.Today I noticed that after passing commands like setup:upgrade css is not loading for back-end while works perfectly in front-end. I checked console and find there was an error and written as Refused to apply style because its MIME type ('text/html') is not a supported style sheet MIME type, and strict MIME checking is enabled.

Please help me to fix this error.

  • Ren which locale are you using on the frontend ? – Sunil Verma Feb 13 '18 at 8:12
  • no i mean to ask what locale for ex : en_US, or en_GB you have on the site ? – Sunil Verma Feb 13 '18 at 8:20
  • can you run php -dmemory_limit=10G bin/magento setup:static-content:deploy en_US -f command to force the en_US content to be deployed once and check then. – Sunil Verma Feb 13 '18 at 8:22
  • waiting for your image – Sunil Verma Feb 13 '18 at 9:49
  • Do you have a .htaccess file in pub/static/ folder and also check the rewrite is allowed on the server or not ? – Sunil Verma Feb 13 '18 at 10:53

double check your file and folder permission before deploy.

first Run the following command one by one

1) chmod -R 644 ./*

2) find . -type d -exec chmod 755 {} \;

3) find . -type f -exec chmod 644 {} \;

5) chmod -R 777 var/*

4) Then deploy again bin/magento setup:static-content:deploy

6) Flush Cache php bin/magento cache:flush

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.