vercel / vercel/next.js

Turbopack: HMR stops updating after client navigation

Open
#98,699 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Linking and Navigating 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/g-wn/next-hmr-repro/

To Reproduce
  1. Clone the repro, install dependencies, and start dev server
  2. Open http://127.0.0.1:3000
  3. Click Page B
  4. Edit the heading in app/b/label.js and save. Note it stays unchanged in the browser.
  5. Reload the page. Note the edit appears.
  6. Edit again. Note the browser now updates w/out reloading - as expected.
Current vs. Expected behavior

Following the steps from the previous section, I expect that editing a file after client navigation will be reflected w/out a manual page reload. Currently, a manual reload is required after client navigation.

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 27.0.0: Tue Aug 11 21:05:48 PDT 2026; root:xnu-13432.1.9~1/RELEASE_ARM64_T6041
  Available memory (MB): 65536
  Available CPU cores: 16
Binaries:
  Node: 24.14.1
  npm: 11.13.0
  Yarn: N/A
  pnpm: 10.8.1
Relevant Packages:
  next: 16.4.0-canary.31 // Latest available version is detected (16.4.0-canary.31).
  eslint-config-next: N/A
  react: 19.2.6
  react-dom: 19.2.6
  typescript: N/A
Next.js Config:
  output: N/A
Which area(s) are affected? (Select all that apply)

Linking and Navigating, Turbopack

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

next dev (local)

Additional context

Issue was reproduced w/

  • Next.js 16.3.5 and 16.4.0-canary.31
  • React 19.2.6 and Node 24.14.1
  • Arc and Chrome browsers
  • MacOS

For comparison, the behavior works as expected using --webpack


🤖 Initial AI investigation suggests that Turbopack's page-specific HMR subscription is registered on a full page load but not after client-side nav. In browser testing, loading the missing registration script manually restored hot updated w/out reloading the page. This points to a missing subscription rather than a file-watching or browser caching issue.

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

Start with the linked reproduction and follow the steps using next dev, then compare the behavior with --webpack. Focus on the Turbopack HMR behavior after navigating to Page B and editing app/b/label.js, including the missing subscription suggested in the report. Done means edits update without a manual reload after client navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
build-system, devtools, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.