Skip to content

When Turbopack is enabled, generateBuildId executes on next dev #86483

@besh

Description

@besh

Link to the code that reproduces this issue

https://github.com/besh/generate-build-id-test

To Reproduce

  1. Start the application in development (next dev)

You should see the following error thrown

Latest Commit REVISION not set for the environment! This is required for the Build ID.

Current vs. Expected behavior

According to the documentation, generateBuildId should NOT execute when running next dev

Next.js generates an ID during next build to identify which version of your application is being served. The same build should be used and boot up multiple containers.

This remains true if you build with webpack via next dev --webpack. When webpack is enabled, the error that I added to the repo to reproduce the error will not be thrown.

We encountered this breaking change while migrating our application to Turbopack. If this is expected behavior, I can push up a documentation change.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Wed Oct 15 21:12:09 PDT 2025; root:xnu-11417.140.69.703.14~1/RELEASE_ARM64_T6031
  Available memory (MB): 36864
  Available CPU cores: 14
Binaries:
  Node: 22.8.0
  npm: 8.19.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.0.4 // Latest available version is detected (16.0.4).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.linear: turbopackConfirmed issue that is tracked by the Turbopack team.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions