`generateBuildId` in `next.config.ts` not respected in v16.2.0+
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/stayko-chalakov/build-id-issue-16.2
To Reproduce
npm installnpm run buildnpm run start- Go to
localhost:3000and open the Network tab in your browser's dev tools - Refresh the page
- Type
build-in the filter input in Network tab and observe the requests to_/next/staticand_next/datawithbuild-TfctsWXpff2fKS
Current vs. Expected behavior
Current (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
Provide environment information
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
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction and next.config.ts at line 7, then run the npm install, build, and start steps against 16.1.7 and 16.2.x. Trace how the configured build ID reaches the _next/static and _next/data requests; done means generateBuildId is respected in both request paths as it was before 16.2.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100