When i try to create a build in react demo V8.2.1 and run the build file i get these error in browser console. index.html:1 Refused to apply style from 'http://127.0.0.1:5501/metronic8/react/demo1/splash-screen.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
index-50c83b4f.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
index.html:1 Refused to apply style from 'http://127.0.0.1:5501/metronic8/react/demo1/assets/index-e1dd9fb8.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
index.html:75 Live reload enabled.
index.html:1 Refused to apply style from 'http://127.0.0.1:5501/metronic8/react/demo1/splash-screen.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
index.html:1 Refused to apply style from 'http://127.0.0.1:5501/metronic8/react/demo1/assets/index-e1dd9fb8.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
How can i fix this?
Hi,
Thank you for your feedback.
Unfortunately, we were not able to reproduce this error.
Did you make any changes to our codebase?
Please let us know if there are any specific steps on how we can get the same error.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
No with the same configuration demo v8.2.1 and i done npm install to install all dependencies, and i built it and while running the build it shows these errors. because of this Vite build, it cause these errors.
just install all dependencies and create a build of demo v 8.2.1 and run the build in browser console. you will get these errors
Hi Ruthara,
Could you please specify your node and npm versions?
Also, try to clear npm cache and reinstall npm dependencies.
npm cache clean --force
.npm install
or yarn install
.Node version v18.18.0 and npm 10.2.5
Hi,
Did you update the base property in vite.config.js?
By default, the base property is set to /metronic8/react/demo1. You should change this path with your server's relative path or, if you deploy the project to your server's root project, you can change the path to /.
Regards,
Lauris Stepanovs,
Keenthemes Support Team