Link to the code that reproduces this issue
https://github.com/ozavodny/turbopack-dynamic-repro
To Reproduce
npm install
npm run build
Current vs. Expected behavior
npm run build fails compilation, because it's using turbopack. When using webpack, everything works fine.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Fri, 22 May 2026 19:25:09 +0000
Available memory (MB): 31185
Available CPU cores: 24
Binaries:
Node: 26.2.0
npm: 11.13.0
Yarn: N/A
pnpm: 9.6.0
Relevant Packages:
next: 16.3.0-canary.40 // Latest available version is detected (16.3.0-canary.40).
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)
cacheComponents
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
We have been able to resolve this issue by patching next.js with this workaround.
Link to the code that reproduces this issue
https://github.com/ozavodny/turbopack-dynamic-repro
To Reproduce
Current vs. Expected behavior
npm run buildfails compilation, because it's using turbopack. When using webpack, everything works fine.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Fri, 22 May 2026 19:25:09 +0000 Available memory (MB): 31185 Available CPU cores: 24 Binaries: Node: 26.2.0 npm: 11.13.0 Yarn: N/A pnpm: 9.6.0 Relevant Packages: next: 16.3.0-canary.40 // Latest available version is detected (16.3.0-canary.40). 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)
cacheComponents
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
We have been able to resolve this issue by patching next.js with this workaround.