Turbopack HMR fails on macos
Nobody has claimed this yet.
- 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
- Use a Macos device
- run npm install
- run npm run dev
- Edit
components/problem-server-component.tsxtext and save. - Observe whether the UI updates immediately with Turbopack
- Edit
components/working-client-component.tsx - Observe client component updates (this one is imported directly, so HMR should work)
- Stop and run
npm run dev:webpack - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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