Refused to execute script from 'x' because its MIME type ('text/html') is not executable
The browser fetched a script but the server labelled it text/html (usually an error page), so it refused to run it.
because its MIME type ('text/html') is not executableRefused to execute script Meaning
With X-Content-Type-Options: nosniff, browsers enforce MIME types. A 404 HTML page or SPA fallback served at a .js URL triggers this.
Common causes
- Script URL returns a 404/HTML page
- SPA fallback serving index.html for missing assets
- Server not mapping .js to application/javascript
⚡ Quick fix
- Open the script URL directly to see what’s returned
- Fix asset paths/base URL
- Configure correct MIME types
Detailed fix by platform
Nginx
- Make sure
include mime.types;is present in the http block
How to diagnose
- Response — What does the script URL return?
- Type — Content-Type header
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- App Service Application Error Azure App Service: ":( Application Error" / container didn’t respond to HTTP pings
- ChunkLoadError ChunkLoadError: Loading chunk 123 failed.
- DevTools failed to load source map DevTools: Failed to load source map — Could not load content for https://…/app.js.map: HTTP error: status code 404
Most viewed in JavaScript
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 9 Oct 2026