Problem withFailed 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

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.

i dont know why its happening , its running perfectly on local host

https://gleaming-kleicha-157323.netlify.app/

The site doesn’t exist.

sorry i debugged it 3 hours of brain stromming
https://cheerful-gnome-d49471.netlify.app/
here s the site

So looks like it’s sovled?

yes its solved , appreciated you replied

What was the solution? I’m facing the same error and it’s costing me money, very upsetting! Please share if you know the solution. Thank you.

Howdy @Mohsin ,

If you could share your site with the community we could help take a look. :slight_smile:

Hi,
Thank you for getting back.
I managed to solve the problem. But, the new problem is that when there’s an environment variable present, it fails to redeploy on changes. When there’s no environment variable present, it redeployed successfully.

Here’s my site meteoriteLandings with the environment variable making the redeployment failure. It has aparently another issue of not recognising marker icon as well! Actually, all of my sites don’t redeploy when environment variable is present.

Please don’t post in unrelated threads about duplicate issues, @Mohsin: Vite: not found. Command failed with exit code 127: npm run build (https://ntl.fyi/exit-code-127)