next.js: 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

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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@timneutkens @sokra Thanks so much for the help. using a volume mount with docker-compose watch fixed the hot reload issue.

So I guess everything is working now. Great job. Closing this.