-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Description
Link to the code that reproduces this issue
https://github.com/willardcsoriano/next-turbopack-bug
To Reproduce
-
Clone the reproduction repository:
git clone https://github.com/willardcsoriano/next-turbopack-bug -
Install dependencies:
npm install -
Start the dev server:
npm run dev -
Open the browser and visit:
http://localhost:3000/test/dynamic-id -
Observe the server console logs:
paramsis a Promise instead of a plain object.- Next.js throws the “params is a Promise” dynamic API error.
-
Compare with the “working” route:
http://localhost:3000/test-working/dynamic-id -
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:
paramsis a Promiseparams.idis 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/AWhich 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)