Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec

Hi, I have a netlify site that succesfully deployed but i’m getting this error - Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec. This is my site URL -
https://uncovermusic.netlify.app/
I think its worth mentioning that i’m using typescript and React, my index.html looks like this


Thank you.

Hi, I fixed it by going deep enough in the other support threads.
My build command is vite build nor npm run build and the publish directory is dist.

Now this is if you’re using Vite.

You can start by sharing your site name so other can check your site.

1 Like