The issue involves a regression in build ID generation affecting caching behavior.
The `generateBuildId` function in `next.config.ts` is not being respected in Next.js v16.2.0+, leading to non-unique build IDs across releases. This causes caching issues and 404 errors on initial page loads. The fix likely involves investigating the build system changes introduced in v16.2.0.
https://github.com/stayko-chalakov/build-id-issue-16.2
npm installnpm run buildnpm run startlocalhost:3000 and open the Network tab in your browser's dev toolsbuild- in the filter input in Network tab and observe the requests to _/next/static and _next/data with build-TfctsWXpff2fKSCurrent (16.2.0 or 16.2.1 or canary):
Expected (before 16.2.0, e.g 16.1.7):
generateBuildId here is not being respected: https://github.com/stayko-chalakov/build-id-issue-16.2/blob/b5ef22c929995fbc383aaca8ae8744f23ccecd81/next.config.ts#L7
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:45 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 10
Binaries:
Node: 23.11.0
npm: 11.6.3
Yarn: 1.22.22
pnpm: 8.15.5
Relevant Packages:
next: 16.1.7 // There is a newer version (16.2.1) available, upgrade recommended!
eslint-config-next: N/A
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Next.js Config:
output: N/A
⚠ There is a newer version (16.2.1) available, upgrade recommended!
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
Not sure
next start (local)
No response
Claim this issue to let others know you're working on it. You'll earn 25 points when you complete it!