ChunkLoadError JavaScript Origin: On your device Last updated 9 Oct 2026

ChunkLoadError: Loading chunk 123 failed.

A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.

Exact message you may see Loading chunk failedFailed to fetch dynamically imported moduleLoading CSS chunk failed
Seen on: JavaScript

Meaning

Users with an open tab still reference old chunk filenames. After deploy those files are gone (404), so dynamic imports fail. Network blips and ad blockers can also cause it.

Common causes

  • New deploy deleted old hashed chunks
  • CDN/cache serving stale index.html
  • Network failure
  • Wrong publicPath/base for chunks

⚡ Quick fix

  1. Keep previous build assets for a while after deploys
  2. Catch the error and reload the page once
  3. Set publicPath/base correctly

Detailed fix by platform

JavaScript

  1. window.addEventListener('vite:preloadError', () => window.location.reload());

How to diagnose

  1. Chunk URL — Does it 404?
  2. Timing — Right after a deploy?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

App Service Application Error — Azure App Service: ":( Application Error" / container didn’t respond to HTTP pings (Azure)App Service Applicati…Can't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'DevTools failed to load source map — DevTools: Failed to load source map — Could not load content for https://…/app.js.map: HTTP error: status code 404 (Browser)DevTools failed to lo…exceeded maximum budget — Angular build: Error: bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 120.00 kB with a total of 1.12 MB (Angular)exceeded maximum budg…FileNotFoundException assembly — Could not load file or assembly 'X, Version=…' or one of its dependencies (.NET)FileNotFoundException…invalid selector — DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector (JavaScript)invalid selectorMIME type not executable — Refused to execute script from 'x' because its MIME type ('text/html') is not executable (JavaScript)MIME type not executa…module MIME type — Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" (JavaScript)module MIME typeChunkLoad…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.