Skip to content

Hot reload and debugger broken on dynamic pages in Next.js 14.2.0-canary.43 with --turbo (broken for all versions of --turbo) - vscode debugger #63740

@avianion

Description

@avianion

Link to the code that reproduces this issue

https://github.com/avianion/nextjs-turbo-broken-dynamic-page-hot-reload-and-vscode-debugger

To Reproduce

To Reproduce:

Set up a Next.js project with Turbopack (--turbo).
Create a dynamic page (e.g., pages/posts/[id].js).
Run the development server.
Make changes to the dynamic page.
Observe that the hot reload does not work, and the vscode debugger breaks.

Current vs. Expected behavior

Current vs. Expected behavior:
Current behavior: Hot reload does not work on dynamic pages, and the debugger breaks, overloading the jest-worker. Next.js searches for the dynamic page in the list of pages but cannot find it.
Expected behavior: Hot reload should work seamlessly on dynamic pages, allowing changes to be reflected immediately without reloading the entire page. The debugger should function correctly without breaking or overloading the jest-worker.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 20.0.0
  npm: 9.6.4
  Yarn: 1.22.19
  pnpm: 7.29.1
Relevant packages:
  next: 14.2.0-canary.43
  react: 18.2.0
  react-dom: 18.2.0

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

Turbopack (--turbo)

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

next dev (local)

Additional context

I am running Next.js in a Docker container on Windows 11.
The issue specifically occurs on dynamic pages (e.g., [id]).
I suspect this might be related to how Next.js handles dynamic pages in combination with Turborepo.

PACK-2881

Metadata

Metadata

Assignees

No one assigned

    Labels

    TurbopackRelated to Turbopack with Next.js.bugIssue was opened via the bug report template.linear: turbopackConfirmed issue that is tracked by the Turbopack team.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions