Nginx: Failed to load module script (application/octet-stream for .mjs)
Browser rejected ES module import because Nginx served .mjs without text/javascript MIME type.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.0.0
Identifier: Nginx: Failed to load module script (application/octet-stream for .mjs)
Platform: Nginx
Interactive Diagnostic Checklist
Safe Diagnostic Command:
curl -fsSI https://omnisolveatlas.com/assets/app-runtime.mjs | grep -i content-type
Technical Explanation
Browser rejected ES module import because Nginx served .mjs without text/javascript MIME type. Verified resolution path: Add a dedicated `location ~* \.mjs$ { types { } default_type "text/javascript; charset=utf-8"; }` block.
Worked Examples
- Read-only diagnostic command: curl -fsSI https://omnisolveatlas.com/assets/app-runtime.mjs | grep -i content-type
Limitations & Assumptions
- Always verify which infrastructure layer (CDN, Nginx, runtime, OS, or database) emitted the error before modifying production config.
Source References & Verification
Resource ID: err-nginx-mjs-wrong-mime · Independently verified: 2026-11-25