Refused to apply style from 'http://192.168.0.104:5500/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. html. code example
Example 1: Refused to apply style from 'http://localhost:9000/public/css/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
For me the solution was: instead, app.use(express.static(__dirname + '/public'));
I have used: app.use(express.static(__dirname));
now everything working correctly
Example 2: Refused to apply style from 'http://localhost:3000/css/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
app.get('/style.css', function(req, res) {
res.sendFile(__dirname + "/" + "style.css");
});