vercel / vercel/next.js

`generateBuildId` in `next.config.ts` not respected in v16.2.0+

Open
#92,154 18 comments 8 reactions 0 assignees View on GitHub

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
  1. npm install
  2. npm run build
  3. npm run start
  4. Go to localhost:3000 and open the Network tab in your browser's dev tools
  5. Refresh the page
  6. Type build- in the filter input in Network tab and observe the requests to _/next/static and _next/data with build-TfctsWXpff2fKS
Current vs. Expected behavior

Current (16.2.0 or 16.2.1 or canary):

Image

Expected (before 16.2.0, e.g 16.1.7):

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.