这是indexloc提供的服务,不要输入任何密码
Skip to content

Turbopack passes params as a Promise instead of an object in dynamic App Router routes #86173

@willardcsoriano

Description

@willardcsoriano

Link to the code that reproduces this issue

https://github.com/willardcsoriano/next-turbopack-bug

To Reproduce

  1. Clone the reproduction repository:
    git clone https://github.com/willardcsoriano/next-turbopack-bug

  2. Install dependencies:
    npm install

  3. Start the dev server:
    npm run dev

  4. Open the browser and visit:
    http://localhost:3000/test/dynamic-id

  5. Observe the server console logs:

    • params is a Promise instead of a plain object.
    • Next.js throws the “params is a Promise” dynamic API error.
  6. Compare with the “working” route:
    http://localhost:3000/test-working/dynamic-id

  7. BOTH routes fail in the same way, confirming it is not code-specific.

Current vs. Expected behavior

Expected Behavior

params should always be a plain object in App Router dynamic routes, e.g.:

{ id: "dynamic-id" }

The function signature:
export default function Page({ params })

should receive the resolved params object, matching documented behavior.

Actual Behavior

Turbopack passes params as a Promise:

Promise { { id: "dynamic-id" }, ... }

This causes Next.js to throw:

Error: Route "/test/[id]" used params.id. params is a Promise and must be unwrapped with await or React.use() before accessing its properties.

Even though the application never used ...params, use(), or any dynamic API.

Logs confirm:

  • params is a Promise
  • params.id is undefined
  • Turbopack breaks route param hydration at runtime
  • Failures occur BEFORE any custom project code is executed

Additional Notes

This occurs even in a pure minimal reproduction created from the official “reproduction-template”, with zero custom config.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home Single Language
  Available memory (MB): 12101
  Available CPU cores: 4
Binaries:
  Node: 22.17.0
  npm: 11.5.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.0.2-canary.19 // There is a newer canary version (16.0.2-canary.21) available, please upgrade!
  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)

Vercel (Deployed), next dev (local)

Additional context

Severity

This breaks all dynamic App Router Server Components using Turbopack in development.

Additional context

  • Issue does not happen in next build / production.
  • Issue does not happen in Webpack mode (NEXT_USE_TURBOPACK=0).
  • Issue happens in all dynamic routes, regardless of folder name.
  • Issue appears before any user code is evaluated.
  • Source map warnings appear repeatedly in the console, suggesting a deeper Turbopack compilation issue.
  • Bug also occurs inside vercel dev, not only next dev, confirming it is in the Turbopack compiler itself—not in local Next.js configuration.

Version regression

Reverting to older canary versions appears to fix the issue, indicating a recent regression in Turbopack route parameter handling.

Deployment environment

Reproduced on:

  • Windows 10
  • Node.js 22
  • Next.js 16 canary
  • Turbopack enabled (default)
Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions