Replies: 1 comment 2 replies
-
Hi @haapti! I'm Dosu and I’m helping the storybook team. This MIME type error usually means the dev server is serving a JavaScript module with the wrong Content-Type, often due to a misconfiguration or plugin interference in Vite. Storybook delegates module file serving to Vite, and there’s no custom MIME type logic in Storybook’s Vite or Next.js integrations—so the issue is likely in Vite’s config or a plugin conflict1. Here’s how you can debug and potentially resolve it:
If the issue persists, you may want to isolate the problem by starting with a minimal Storybook + Next.js + Vite setup and gradually reintroducing your config and plugins. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other Footnotes |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
im running Storybook 9.1.2 for nextjs-vite.
when running storybook dev server, im getting this error on browser console and none of the stories are displaying, only white pages with loading animation.
Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "video/mp2t". Strict MIME type checking is enforced for module scripts per HTML spec.
no errors in build logs.
found an old discussion about this error on vitejs vitejs/vite#9332
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions