nextjs - 💡(How to fix) Fix Dev-only error with await params in root layout plus parallel routes under dynamic params [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#87726Fetched 2026-04-08 02:06:21
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
subscribed ×3labeled ×2issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:08:48 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T8132
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: N/A
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.1 // Latest available version is detected (16.1.1).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Next.js with cacheComponents enabled breaks on dev environment when using await params on the root layout and we use parallel routes inside a route with dynamic parameters.

This issue happens on next dev only. It doesn't show up on next build or next start.

Link to the code that reproduces this issue

https://github.com/ceolinwill/nextjs-cache-root-parallel

To Reproduce

  1. Create a root layout under a dynamic segment (eg. locale): app/[locale]/layout.tsx
  2. Inside that layout, use await params to get the locale
  3. Create a parallel route inside a dynamic segment (eg. app/[locale]/@navbarActions/posts/[id])
  4. Run next dev and navigate to a page that uses the parallel route (you need to refresh the page manually, it won't break on client-side navigation): http://localhost:3000/en/posts/1

Current vs. Expected behavior

The page should load without errors or it should be consistent between next dev and next build.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:08:48 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T8132
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: N/A
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.1 // Latest available version is detected (16.1.1).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

cacheComponents, Parallel & Intercepting Routes

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

next dev (local)

Additional context

Adding a root layout with Suspense before the dynamic [locale] segment fixes the issue.

extent analysis

TL;DR

  • Adding a root layout with Suspense before the dynamic segment may resolve the issue with Next.js cacheComponents in the dev environment.

Guidance

  • Verify that the issue is specific to next dev and does not occur in next build or next start to confirm the environment-specific nature of the problem.
  • Try adding a root layout with Suspense before the dynamic [locale] segment, as mentioned in the additional context, to see if it resolves the issue.
  • Review the code at the provided GitHub link to understand how the parallel routes and dynamic parameters are set up, which may help in identifying the root cause.
  • Consider testing with different versions of Next.js or related packages to see if the issue persists, although the latest version is already being used.

Example

No specific code example is provided due to the complexity and specificity of the issue, but reviewing the code at https://github.com/ceolinwill/nextjs-cache-root-parallel may offer insights.

Notes

  • The issue seems to be highly specific to the combination of cacheComponents enabled, the use of await params in the root layout, and the presence of parallel routes inside a dynamic segment, all within the next dev environment.
  • The fact that adding a Suspense wrapper fixes the issue suggests a potential rendering or timing issue that Suspense mitigates.

Recommendation

  • Apply the workaround by adding a root layout with Suspense before the dynamic segment, as it has been reported to fix the issue without requiring a version upgrade or significant code changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Dev-only error with await params in root layout plus parallel routes under dynamic params [1 participants]