❌ Module script not loading due to incorrect MIME type on production deploy

Netlify Site Name:
cluster-ds-club.netlify.app


Issue Description:
After the latest production deploy, I’m getting the following error in the browser console:

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.

The module script is not loading, and the application is not working as expected in production. When I try to open the script file URL directly in the browser, it tries to download the file instead of displaying the JS content.


Custom Domain / DNS Issues:
No custom domain — using the Netlify subdomain.


Build Settings Screenshot & Logs:

What I’ve Tried:

  • Verified the issue appears only in production
  • Confirmed the file works as expected locally
  • Used Ask Netlify chatbot and reviewed support guides

Please help resolve this MIME type issue so the module script loads correctly.

Thank you!

@UtsavS26 While it presents as a MIME type related error, the true issue is with your configuration.

You’re accidentally deploying your source code…

See how it has /src/main.jsx

You can even see an error in your screenshot where it says:

When resolving config file /opt/build/repo/netlify.toml
Base directory does not exist: /opt/build/repo/cluster

Check and fix your Build configuration
https://docs.netlify.com/configure-builds/overview/
https://docs.netlify.com/configure-builds/file-based-configuration/

Make sure your Base directory, Build command and Publish directory are correct.