Why do visitors get chunk load errors right after I deploy?

Visitors who already had the site open still request the previous hashed files. When those files are gone, the browser throws a chunk load error. A reload loads the new page. Keep the previous files for a while, cache the HTML briefly, and send the error with Sentry.captureException before any automatic reload, or the count never arrives.

Last updated 26 November 2026. By Paul Badarau.

Lena, a fictional developer, deploys a lamp shop at lunch. Visitors who opened the site that morning hit a chunk error when they open a product, because that page still asks for the old file.

  1. A bundler names each extra file with a hash. A page that is already open keeps the old names. Deleting those files on deploy makes the next load fail. A webpack build reports ChunkLoadError: Loading chunk 12 failed. Chromium reports Failed to fetch dynamically imported module for a native dynamic import. Other browsers use their own wording for the same missing file.
  2. A reload requests the new HTML, which names the new files. Keep the previous hashed files available for a while after the deploy. Cache the HTML briefly, and cache the hashed files for a long time, so an old page can still fetch the names it holds.
  3. A page that reloads itself as soon as the load fails recovers the visitor and hides the count. Call Sentry.captureException with that error before the reload. Set release in Sentry.init to the build you shipped, so the stored event names it.

The SDK can report a chunk that fails after the SDK has started. It cannot report a main file that never ran. A count that keeps rising after the old files are available again is a path the new build itself cannot load.

The product page for this is Monitoring.

Start your 14-day free trial