Console error:

Refused to apply style from 'https://app.bartofilpc.test/media/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

After installing Magento 2 Luma theme, some front-end configuration is missing. Commands I've tried:

  • Copying vendorand composer.json from another project
  • bin/magento setup:di:compile
  • bin/magento sampledata:install and bin/magento setup:upgrade
  • Removing sampledata and installing again

enter image description here

Only thing that worked so far was reinstalling Magento.

P.S.: Had to reinstall the Magento store to work, because nothing worked so far (Aug 30, 2022).

2 Answers 2


I had this issue recently and performed a config change:

  • if you have access to the backend, go to Store/Configuration/Advanced/Developer/Static Files Settings and set the Field Sign Static Files to No

  • if this is not possible, you can change the file app/etc/env.php and add the following at the end so that it appears like the screenshot below (dev should be a siblings to the node backend for instance)

    'dev' => [ 'static' => [ 'sign' => '0' ] ]

enter image description here

and then run bin/magento set:upg

  • The backend setting was already defined to No and the code is exactly as your screenshot. Aug 19, 2022 at 16:45

Please check the .htaccess file is existing in the pub/ and pub/media.

  • Both .htaccess files exist and were not modified. Aug 19, 2022 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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