nextjs - 💡(How to fix) Fix Importing react-dom in global-error makes app uninteractive [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85723Fetched 2026-04-08 02:14:08
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Error Message

If you remove toast import from global-error.tsx the app works.

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:45 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 24.10.0
  npm: 11.6.1
  Yarn: 1.22.21
  pnpm: 8.14.0
Relevant Packages:
  next: 16.0.2-canary.5 // Latest available version is detected (16.0.2-canary.5).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/lfbergee/next16-react-dom-bug

To Reproduce

  1. Start the application
  2. Click the button and nothing happens

If you remove toast import from global-error.tsx the app works.

Current vs. Expected behavior

In Next 15 this worked. In Next 16 click handlers do not do anything, it fails completely silently.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:45 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 24.10.0
  npm: 11.6.1
  Yarn: 1.22.21
  pnpm: 8.14.0
Relevant Packages:
  next: 16.0.2-canary.5 // Latest available version is detected (16.0.2-canary.5).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

React

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

next dev (local)

Additional context

I expect the issue is that react-dom is imported from the component is a different version than the one Next ships with, so I end up with multiple versions of react-dom in the tree, rendering the app unusable.

Importing the toast inside of page works, as I expect Next picking its internal react-dom version in that case.

extent analysis

TL;DR

The issue can likely be resolved by ensuring that only one version of react-dom is used throughout the application, potentially by removing the explicit import of react-dom or using the version shipped with Next.js.

Guidance

  • Verify that the react-dom version used in the component is the same as the one shipped with Next.js (19.2.0) to avoid version conflicts.
  • Try removing the explicit import of react-dom from the component and rely on the version provided by Next.js.
  • If the issue persists, attempt to import the toast component inside a page component to see if Next.js picks up its internal react-dom version, as mentioned in the additional context.
  • Check the node_modules directory to ensure that there are no duplicate versions of react-dom installed.

Example

No explicit code example is provided as the issue seems to be related to version conflicts rather than code syntax.

Notes

The issue might be specific to the combination of Next.js version 16 and React version 19.2.0, and resolving the version conflict may require adjusting the imports or the project's dependencies.

Recommendation

Apply workaround: Remove the explicit import of react-dom from the component and rely on the version provided by Next.js, as this approach has been shown to work in the provided example.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Importing react-dom in global-error makes app uninteractive [1 comments, 2 participants]