nextjs - 💡(How to fix) Fix Turbopack does not handle transpilePackages for monorepos [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#85315Fetched 2026-04-08 02:16:27
View on GitHub
Comments
1
Participants
2
Timeline
16
Reactions
0
Author
Participants
Timeline (top)
subscribed ×6labeled ×3closed ×1comment_deleted ×1

Root Cause

Adding back --webpack works. This is the first time we are trying out turbopack because of next@16, so not sure if this has ever worked before

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Tue Oct 14 21:32:54 PDT 2025; root:xnu-12377.41.5~4/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 14
Binaries:
  Node: 22.13.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/aulonm/nextjs-16-turbopack-monorepo-transpile-bug

To Reproduce

  1. Clone https://github.com/aulonm/nextjs-16-turbopack-monorepo-transpile-bug
  2. pnpm i
  3. pnpm dev
  4. go to localhost:3000

Results in:

<img width="410" height="209" alt="Image" src="https://github.com/user-attachments/assets/23ce6b8d-6fc7-4d9b-8701-81bad1859f8c" />

Current vs. Expected behavior

Current

Can't use internal monorepo packages with turbopack, it does not care about transpilePackages-property in next.config

Expected behavior

Turbopack should manage to transpile packages that are internal so that we don't need to run tsc or some kind of build system everytime we do changes to the internal packages

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Tue Oct 14 21:32:54 PDT 2025; root:xnu-12377.41.5~4/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 14
Binaries:
  Node: 22.13.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  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

Adding back --webpack works. This is the first time we are trying out turbopack because of next@16, so not sure if this has ever worked before

extent analysis

TL;DR

The issue can likely be resolved by configuring Turbopack to properly transpile internal monorepo packages, potentially by adjusting the next.config file or exploring alternative build configurations.

Guidance

  • Review the next.config file to ensure that the transpilePackages property is correctly set up for internal monorepo packages.
  • Consider adding a custom Webpack configuration to handle transpilation for Turbopack, as the --webpack flag currently works as a workaround.
  • Investigate Turbopack's documentation and configuration options to see if there are specific settings or plugins needed for monorepo package transpilation.
  • Verify that the versions of Next.js, React, and TypeScript are compatible with Turbopack and the current project configuration.

Example

No specific code example can be provided without further details on the next.config file or custom Webpack configurations.

Notes

The issue seems to be specific to the combination of Next.js 16, Turbopack, and monorepo package transpilation. The fact that adding back --webpack works suggests a configuration or compatibility issue rather than a fundamental problem with Turbopack itself.

Recommendation

Apply workaround: Use the --webpack flag as a temporary solution until a proper configuration for Turbopack can be determined, as it currently allows the project to function as expected.

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 should manage to transpile packages that are internal so that we don't need to run tsc or some kind of build system everytime we do changes to the internal packages

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 Turbopack does not handle transpilePackages for monorepos [1 comments, 2 participants]