Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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 ' 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 ' 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 ' 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 ' 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(