Errors / JavaScript errors
TypeError: Failed to fetch dynamically imported module
The site was updated while the visitor had it open, and the part they clicked on no longer exists.
The visitor clicks and nothing happens, or sees a blank page, until they reload.
Why it happens
- A new deploy replaced the build's hashed chunk files; a visitor on the old version navigates, and the browser asks for a chunk that is gone.
- A CDN or cache serving HTML from one deploy and assets from another.
- Rarely, a network error while loading that chunk.
How to fix it
- Keep the previous deploy's assets available for a while (most hosts can), so old tabs still find their chunks.
- Catch the failure and reload once: Vite fires
vite:preloadErroronwindowfor exactly this. - Make sure HTML is not cached longer than the assets it points at.
Whose problem it is
Usually the site's own code or settings.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.
Often seen with
- ChunkLoadError: Loading chunk failedPart of the site's code could not be downloaded, usually because the site changed since the page was opened.
- Unexpected token '<'The browser asked for a script and got a web page instead, usually an error page or the home page.