# ChunkLoadError: Loading chunk 123 failed.

**Code:** `ChunkLoadError` · **Category:** JavaScript · **Seen on:** JavaScript

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/javascript/chunkloaderror)
