nextjs - 💡(How to fix) Fix [Turbopack] rootParams: next/root-params exports not generated by compiler [1 comments, 2 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#92742Fetched 2026-04-15 06:18:34
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
closed ×1commented ×1labeled ×1locked ×1

Error Message

throw new Error("This module is a placeholder for 'next/root-params' and should be replaced by the compiler.")

Root Cause

This blocks all i18n libraries from working with `cacheComponents: true` (PPR):

  • next-intl#1493 — cacheComponents not supported
  • #86870 — all localization frameworks break with cache components

Without `root-params`, apps with i18n routing get ~15K `next_metadata_boundary` errors/day (CSR fallback instead of PPR).

Code Example

Operating System: macOS Darwin 24.6.0
Next.js: 16.2.3
Node.js: v25.8.2
Turbopack: stable (default)
next-intl: 4.9.1

---

git clone https://github.com/pomathieu/nextjs-rootparams-turbopack-repro
cd nextjs-rootparams-turbopack-repro
npm install
npm run build
RAW_BUFFERClick to expand / collapse

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: macOS Darwin 24.6.0
Next.js: 16.2.3
Node.js: v25.8.2
Turbopack: stable (default)
next-intl: 4.9.1

Which area(s) are affected?

Turbopack

Link to reproduction

https://github.com/pomathieu/nextjs-rootparams-turbopack-repro

To reproduce

git clone https://github.com/pomathieu/nextjs-rootparams-turbopack-repro
cd nextjs-rootparams-turbopack-repro
npm install
npm run build

Describe the bug

With `rootParams: true` in `next.config.ts`, the Turbopack compiler does not generate named exports from `next/root-params`. Build fails:

``` Export locale doesn't exist in target module

1 | import * as rootParams from "next/root-params"; The module has no exports at all. ```

The `next/root-params.js` at package root is a placeholder that should be replaced by the compiler: ```js throw new Error("This module is a placeholder for 'next/root-params' and should be replaced by the compiler.") ```

The implementation exists at `dist/server/request/root-params.js` (`getRootParam` function), but Turbopack never generates the per-segment named exports (e.g. `locale()`).

Why this matters

This blocks all i18n libraries from working with `cacheComponents: true` (PPR):

  • next-intl#1493 — cacheComponents not supported
  • #86870 — all localization frameworks break with cache components

Without `root-params`, apps with i18n routing get ~15K `next_metadata_boundary` errors/day (CSR fallback instead of PPR).

Expected behavior

Turbopack generates named exports from `next/root-params` based on dynamic route segments when `rootParams: true`.

Actual behavior

No exports generated. Build fails.

extent analysis

TL;DR

The most likely fix is to update the Turbopack configuration or Next.js version to properly handle rootParams: true and generate named exports from next/root-params.

Guidance

  • Verify that the next.config.ts file is correctly configured with rootParams: true and that the Turbopack version is up-to-date.
  • Check the dist/server/request/root-params.js file to ensure that the getRootParam function is correctly implemented and exported.
  • Investigate the possibility of a compatibility issue between Turbopack and next-intl versions.
  • Review the reproduction steps and ensure that the build process is correctly set up to use Turbopack.

Example

No code snippet is provided as the issue is more related to configuration and compatibility.

Notes

The issue seems to be related to a compatibility problem between Turbopack and next-intl, and the provided reproduction steps and environment information are helpful in identifying the issue. However, without more information about the specific versions and configurations used, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: The issue is blocking the use of cacheComponents: true with i18n libraries, so a temporary workaround might be to disable cacheComponents or use a different localization framework until the issue is resolved.

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…

FAQ

Expected behavior

Turbopack generates named exports from `next/root-params` based on dynamic route segments when `rootParams: true`.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING