-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS Mime type error #197
Comments
UpdateThe type was text/html because that was a 404 error. My bad 🥇 |
For unsupported stylesheet MIME type error. Please check the network tab. This usually happens when there is a typo in file/path name. The browser gets 404 error in response which cannot be applied like css. |
Another thing to keep in mind: after you fix the path, you might need to do a hard reload in your browser ( |
Most of the time people get CSS MIME error could be because of the wrong path of css file in your code |
I renamed style.css with styles.css |
Thank you @krupenja your comment saved me |
i changed from style.css to styles.css and did a hard reload and tried downloading the npm mime-type package and nothing is still working. the same is happening when I put app.js in the source code. any help? |
no no no, i got this with RIGHT path, why is it closed? because OP too dumb? |
I'm submitting a Bug report
Current behavior
Refused to apply style from 'http://127.0.0.1:5500/website/display/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
When loading a CSS file I get an error like above, and the stylesheet doesn't load.
Expected
Mime type of the CSS file would be text/css instead of text/html. It might be a good idea to use the mime-type npm package to dynamically assign the style.
Environment
The text was updated successfully, but these errors were encountered: