Skip to content

Turbopack panic loop on Windows with pnpm: Next.js package not found + ChunkLoadError on /dashboard #92534

@mirraman

Description

@mirraman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions