-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Open
Copy link
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.
Description
Link to the code that reproduces this issue
https://github.com/AlessioGr/next-16-repro
To Reproduce
- clone https://github.com/AlessioGr/next-16-repro
pnpm ipnpm dev- open
http://localhost:3000/page1 - go to
src/app/page2/page.tsxand type. This will trigger HMR - keep triggering HMR until you get the error
Current vs. Expected behavior
In Payload CMS, we listen to the HMR websocket in order to reload the payload config when changes happen.
After upgrading from Next.js 15.4.x → 16 (and starting in 15.5.0), HMR in dev frequently fails with:
⨯ Error: Could not find the module "[project]/src/Component.tsx#Component" in the React Client Manifest. This is probably a bug in the React Server Components bundler.
at stringify (<anonymous>) {
digest: '3482605753'
}Affected setup
All of the following tend to be present when the issue reproduces:
- Build tool: Turbopack (does not reproduce with Webpack / --no-turbo)
- Next.js: 16.0.x (also 15.5.x)
- A 'use client' component passed from a (non-async) page (page1) into an RSC
- The page renders an <iframe> that loads another page (page2)
- Both page1 and page2 have HMR listeners
- page1 is open. Due to the iframe, this means that both hmr listeners are actively running at the same time
- The HMR listener performs an async action on its subsequent invocation after HMR fires
In our case (Payload CMS live preview) the admin and frontend each create their own HMR subscriptions. When both are active, HMR frequently floods the server console with the manifest error above.
The problem began in Next.js 15.5.0 and persists in 16.0.x.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:34:05 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6041
Available memory (MB): 49152
Available CPU cores: 16
Binaries:
Node: 24.0.1
npm: 10.9.0
Yarn: 1.22.22
pnpm: 10.11.0
Relevant Packages:
next: 16.0.2-canary.9 // Latest available version is detected (16.0.2-canary.9).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.7.3
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Original issue report in Payload with analysis: payloadcms/payload#14419
First attempt to fix it from our side: payloadcms/payload#14502
AlessioGr, GermanJablo, r1tsuu, timothylp, paulpopus and 15 more
Metadata
Metadata
Assignees
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.