nextjs - 💡(How to fix) Fix Turbopack panic loop on Windows with pnpm: Next.js package not found + ChunkLoadError on /dashboard [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#92534Fetched 2026-04-09 07:49:54
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1issue_type_added ×1labeled ×1

Error Message

  • FATAL: An unexpected Turbopack error occurred

Root Cause

  • Terminal repeats:
    • FATAL: An unexpected Turbopack error occurred
  • Panic log contains:
    • Failed to write app endpoint /dashboard/page
    • Caused by: Next.js package not found
  • Browser console shows:
    • unhandledRejection: ChunkLoadError: Failed to load chunk /_next/static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_....js

Fix Action

Fix / Workaround

  • Reproducible locally on Windows (not deployment-related).
  • Not tied to browser-specific behavior; issue is visible from terminal panic + HMR chunk failure.
  • Panic log path:
    • C:\Users\alexb\AppData\Local\Temp\next-panic-9af8463e3b894e5eb6901e1b800b28fa.log
  • next is installed and resolvable:
    • node -e "console.log(require.resolve('next/package.json'))"
    • resolves to node_modules/.pnpm/.../next/package.json
  • Workaround:
    • next dev --webpack works
    • clearing .next cache helps only temporarily for Turbopack

Code Example

- OS: Windows
- Node.js: v22.14.0
- pnpm: 10.20.0
- next: 16.2.0
- react: 19.2.4
- react-dom: 19.2.4
- Router: App Router
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/mirraman/turbopack-panic-repro

To Reproduce

  1. Create a Next.js App Router project with pnpm on Windows.
  2. Use versions:
    • next: 16.2.0
    • react: 19.2.4
    • react-dom: 19.2.4
    • node: v22.14.0
    • pnpm: 10.20.0
  3. Run pnpm dev (Turbopack).
  4. Open /dashboard and refresh multiple times.
  5. Observe terminal + browser console.

Current vs. Expected behavior

Expected behavior

  • next dev with Turbopack should not panic.
  • /dashboard should render without repeated crashes.
  • HMR chunk should load normally.

Actual behavior

  • Terminal repeats:
    • FATAL: An unexpected Turbopack error occurred
  • Panic log contains:
    • Failed to write app endpoint /dashboard/page
    • Caused by: Next.js package not found
  • Browser console shows:
    • unhandledRejection: ChunkLoadError: Failed to load chunk /_next/static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_....js

Provide environment information

- OS: Windows
- Node.js: v22.14.0
- pnpm: 10.20.0
- next: 16.2.0
- react: 19.2.4
- react-dom: 19.2.4
- Router: App Router

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

Turbopack

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

next dev (local)

Additional context

  • Reproducible locally on Windows (not deployment-related).
  • Not tied to browser-specific behavior; issue is visible from terminal panic + HMR chunk failure.
  • Panic log path:
    • C:\Users\alexb\AppData\Local\Temp\next-panic-9af8463e3b894e5eb6901e1b800b28fa.log
  • next is installed and resolvable:
    • node -e "console.log(require.resolve('next/package.json'))"
    • resolves to node_modules/.pnpm/.../next/package.json
  • Workaround:
    • next dev --webpack works
    • clearing .next cache helps only temporarily for Turbopack

extent analysis

TL;DR

The most likely fix is to use the --webpack flag with next dev or to investigate and resolve the issue with Turbopack configuration or dependencies.

Guidance

  • Investigate the Turbopack configuration to ensure it is correctly set up for the App Router project.
  • Verify that the next package is properly installed and resolvable by running node -e "console.log(require.resolve('next/package.json'))" and checking the output.
  • Try clearing the .next cache and then running next dev with Turbopack to see if the issue is temporarily resolved.
  • Consider using the --webpack flag with next dev as a temporary workaround, as it has been reported to work.

Example

No code snippet is provided as the issue is related to configuration and dependencies rather than code.

Notes

The issue seems to be specific to Turbopack and the App Router project on Windows. The fact that next dev --webpack works and clearing the .next cache provides temporary relief suggests that the issue may be related to Turbopack's caching or configuration.

Recommendation

Apply the workaround by using the --webpack flag with next dev, as it has been reported to work and allows for continued development while the Turbopack issue is investigated and 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

  • next dev with Turbopack should not panic.
  • /dashboard should render without repeated crashes.
  • HMR chunk should load normally.

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 panic loop on Windows with pnpm: Next.js package not found + ChunkLoadError on /dashboard [1 participants]