nextjs - 💡(How to fix) Fix Next.js Turbopack build failed. Error: Could not parse module '[project]/node_modules/next/dist/server/route-modules/app-route/vendored/contexts/router-context.js', file not found [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#88809Fetched 2026-04-08 02:03:55
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:56 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 12
Binaries:
  Node: 25.3.0
  npm: 11.7.0
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.1.4 // Latest available version is detected (16.1.4).
  eslint-config-next: 15.5.9
  react: 19.2.3
  react-dom: 19.2.3
  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/bayer-int/wsf-nxg-fe/tree/poc/56608-turbopack

To Reproduce

Using pages route in next.js and setup with the nx monorepo. Works fin with development build. failing when production build.

Current vs. Expected behavior

Node : 25.3.0 OS : darwin-arm64 Native Target : aarch64-macos yarn : 1.22.22

nx (global) : 22.3.3 nx : 22.3.3 @nx/js : 22.3.3 @nx/eslint : 22.3.3 @nx/workspace : 22.3.3 @nx/jest : 22.3.3 @nx/cypress : 22.3.3 @nx/devkit : 22.3.3 @nx/eslint-plugin : 22.3.3 @nx/module-federation : 22.3.3 @nx/next : 22.3.3 @nx/react : 22.3.3 @nx/rollup : 22.3.3 @nx/storybook : 22.3.3 @nx/vite : 22.3.3 @nx/vitest : 22.3.3 @nx/web : 22.3.3 @nx/webpack : 22.3.3 typescript : 5.9.3

Community plugins: @webpro/nx-tsc : 0.0.2

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:56 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 12
Binaries:
  Node: 25.3.0
  npm: 11.7.0
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.1.4 // Latest available version is detected (16.1.4).
  eslint-config-next: 15.5.9
  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)

Turbopack

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

next build (local)

Additional context

I am moving from webpack to turbopack.

extent analysis

TL;DR

  • The issue is likely related to the configuration or compatibility of Turbopack with the Next.js project, and switching back to Webpack or adjusting Turbopack settings may resolve the issue.

Guidance

  • Review the Turbopack configuration to ensure it is compatible with the Next.js project setup.
  • Check the Next.js documentation and Turbopack guides for any specific requirements or recommendations for using Turbopack with Next.js.
  • Consider temporarily switching back to Webpack to isolate if the issue is indeed related to Turbopack.
  • Verify that all dependencies, including @nx/next and next, are up-to-date and compatible with Turbopack.

Notes

  • The issue seems to be related to the build process, specifically when using Turbopack, and more information about the project setup and configuration might be needed to provide a more precise solution.
  • The fact that the development build works fine but the production build fails suggests a potential issue with the build optimization or configuration.

Recommendation

  • Apply workaround: Temporarily switch back to Webpack to verify if the issue is indeed related to Turbopack, and then investigate further configuration or compatibility issues with Turbopack.

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