Errors / JavaScript errors
ChunkLoadError: Loading chunk … failed
Part of the site's code could not be downloaded, usually because the site changed since the page was opened.
A route or a feature does not load until the visitor refreshes.
Why it happens
- The webpack or Next.js version of the same problem: a deploy removed the chunk an open tab still asks for.
- A chunk URL answering HTML (a 404 page) instead of JavaScript.
- A flaky connection timing out on one of many small files.
How to fix it
- Keep old build assets for some time after a deploy; with Next.js, a deployment ID or skew protection keeps a tab on its own version.
- Catch the error at the route level and reload the page once.
- Check the chunk URL in the failed requests: a 404 or HTML means a deploy, a timeout means the network.
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
- Failed to fetch dynamically imported moduleThe site was updated while the visitor had it open, and the part they clicked on no longer exists.