vercel / vercel/next.js

Turbopack HMR fails on macos

Open
#96,709 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Turbopack
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/ingoe/turbopack-hmr-macos-issue

To Reproduce
  1. Use a Macos device
  2. run npm install
  3. run npm run dev
  4. Edit components/problem-server-component.tsx text and save.
  5. Observe whether the UI updates immediately with Turbopack
  6. Edit components/working-client-component.tsx
  7. Observe client component updates (this one is imported directly, so HMR should work)
  8. Stop and run npm run dev:webpack
  9. Repeat step 1 and compare behavior
Current vs. Expected behavior

Currently the HMR fails to update a server component which is registered using a singleton pattern registry.
Expected is HMR updates the page in the browser according to the changed source.

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.6.0: Sat Jul 11 15:27:26 PDT 2026; root:xnu-12377.161.13~4/RELEASE_ARM64_T6031
  Available memory (MB): 65536
  Available CPU cores: 16
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: N/A
  pnpm: 10.6.5
Relevant Packages:
  next: 16.3.0 // Latest available version is detected (16.3.0).
  eslint-config-next: N/A
  react: 19.2.8
  react-dom: 19.2.8
  typescript: 5.8.3
Next.js Config:
  output: N/A
Which area(s) are affected? (Select all that apply)

Turbopack

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

next dev (local)

Additional context

When using a singleton pattern to register components HMR is not updating the content in the browser when using turbopack. With webpack the issue did not happen.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Clone the reproduction at https://github.com/ingoe/turbopack-hmr-macos-issue and start with components/problem-server-component.tsx and components/working-client-component.tsx. Run npm run dev, compare server-component and client-component edits, then repeat with npm run dev:webpack. Done means the singleton-registered server component updates in the browser under Turbopack as it does with Webpack.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, nextjs, react, typescript
Domain
build-system, devtools, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.