Common Next.js errorsChunkLoadError after a deploy
ChunkLoadError: Loading chunk 123 failed, or a page that goes blank right after you deploy. Visitors who had your site open are still running the old version, and the old version asks for code files the new deploy no longer has.
Why it happens
Each build names its JavaScript files after their contents. When a tab from yesterday navigates to a new page, it requests yesterday's file names. This mismatch between an open tab and the server is called version skew.
How to fix it
On Vercel, turn on Skew Protection in your project's settings, which keeps serving older builds' files to tabs that still need them. When you host Next.js yourself, set a deploymentId; Next.js then spots the mismatch and does a full page reload instead of a broken navigation:
module.exports = {
deploymentId: process.env.GIT_SHA,
}
Keeping the previous build's static files available for a day after each deploy also helps any setup.