I Install Drupal in local and when i run It the website runs without css and This error appears :
Refused to apply style from 'http://localhost/drupal_test/' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
Related
Drupal 9 Refused to apply style from 'https://example.com/' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Upgrading UI from DSpace 7.2 to 7.3, the CSS is not loading on home page. I get this error on console:
Refused to apply style from 'https://localhost/dspace-theme.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Running on a Virtual Box, under Rocky Linux 8.5.
It seems that the problem was that the file dspace-theme.css was missing. I tried copying it to the supposed location ([dspace-source]/dist/browser/dspace-theme.css) with no success.
Finally, I ended up downloading and building the UI source code again on another folder, and now it works.
I am learning server rendering react currently. And I try to convert a product-landing -page Demo to react with express, babel, Webpack.
There are two problems currently after building and running npm start:
index.css cannot link to index.html, the error in console is :The resource from “http://localhost:3100/index.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
the Logo image in /img cannot load to the index.html.
My folder structure is:
...
-client/App.jsx
/client.jsx
-dist/client.js
-img(for images)
-public/index.html
/index.css
-server/index.js
...
The error in console is : The resource from “http://localhost:3100/index.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
My entire code in github:
https://github.com/Jo-Zh/Product-Landing-Page.
Can anyone give me some hint?
Thanks!
I have update WebPack to v4.17 .but I have delay on website loading with this error on console :
Refused to apply style from 'https://.../stylesheets/application.css'
because its MIME type ('text/html') is not a supported stylesheet MIME
type, and strict MIME checking is enabled.
what Should I do ??
I have created an angular 5 project with angular cli. referenced css in angular-cli.json style tag.
"styles": [
"styles.css",
"static/css/custom.css",
"static/css/style.bundle.css",
"static/css/vendors.bundle.css",
"static/css/fullcalendar.bundle.css"
]
when i try to run app in browser. i get font files aborted error in console
GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.woff2?v=4.7.0 net::ERR_ABORTED
fonts/font-awesome/fontawesome-webfont.woff?v=4.7.0:1 GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.woff?v=4.7.0 net::ERR_ABORTED
fonts/font-awesome/fontawesome-webfont.ttf?v=4.7.0:1 GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.ttf?v=4.7.0 net::ERR_ABORTED
these font files are being used in vendors.bundle.css
what have i tried:
I tried to change url src: url("fonts/socicon/socicon.eot") to src: url("/fonts/socicon/socicon.eot") in css file.
I tried to load css like this,
<link rel="stylesheet" type="text/css" ref="./static/css/style.bundle.css"/>
but it gave me this error
**because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled**
Angular 2: file not found on local .json file
It seems that the "static" folder not accessible. This previous issue may help.