Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Build Issues


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?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


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.


  1. Delete node_modules and yarn.lock/pacakge-lock.json.

  2. Run command to clear npm cache npm cache clean --force.

  3. Then install dependencies again with npm install or yarn install.



Regards,
Lauris Stepanovs,
Keenthemes Support Team

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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(