Link to the code that reproduces this issue
https://github.com/mirraman/turbopack-panic-repro
To Reproduce
- Create a Next.js App Router project with pnpm on Windows.
- Use versions:
- next: 16.2.0
- react: 19.2.4
- react-dom: 19.2.4
- node: v22.14.0
- pnpm: 10.20.0
- Run
pnpm dev (Turbopack).
- Open
/dashboard and refresh multiple times.
- 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
Link to the code that reproduces this issue
https://github.com/mirraman/turbopack-panic-repro
To Reproduce
pnpm dev(Turbopack)./dashboardand refresh multiple times.Current vs. Expected behavior
Expected behavior
next devwith Turbopack should not panic./dashboardshould render without repeated crashes.Actual behavior
FATAL: An unexpected Turbopack error occurredFailed to write app endpoint /dashboard/pageCaused by: Next.js package not foundunhandledRejection: ChunkLoadError: Failed to load chunk /_next/static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_....jsProvide environment information
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
C:\Users\alexb\AppData\Local\Temp\next-panic-9af8463e3b894e5eb6901e1b800b28fa.lognextis installed and resolvable:node -e "console.log(require.resolve('next/package.json'))"node_modules/.pnpm/.../next/package.jsonnext dev --webpackworks.nextcache helps only temporarily for Turbopack