Skip to content

fix(mobile): resolve duplicate React instances in Bun monorepo#37

Merged
dhairyashiil merged 1 commit into
mainfrom
fix/react-duplicate-instances
Mar 13, 2026
Merged

fix(mobile): resolve duplicate React instances in Bun monorepo#37
dhairyashiil merged 1 commit into
mainfrom
fix/react-duplicate-instances

Conversation

@volnei
Copy link
Copy Markdown
Contributor

@volnei volnei commented Mar 13, 2026

Summary

  • The chat app depended on react@19.2.3 while the mobile app used react@19.2.4. Bun hoisted 19.2.3 to root node_modules, causing Metro to bundle two separate React copies
  • The React Compiler's useMemoCache accessed the wrong instance's ReactSharedInternals dispatcher (null), crashing the web build with a blank page
  • Aligns chat app to react@19.2.4 (same version used before the monorepo migration)
  • Forces Metro to resolve react/react-dom from apps/mobile/node_modules to prevent future hoisting issues

Follows up on #36 (widget guard fix was merged but this commit was missing).

Test plan

  • Local web export builds successfully
  • Login page renders with zero console errors locally
  • Verify companion.cal.com loads correctly after deploy
  • Verify native iOS/Android builds still work

🤖 Generated with Claude Code

The chat app depended on react@19.2.3 while the mobile app used
react@19.2.4. Bun hoisted 19.2.3 to the root node_modules, causing
Metro to bundle two separate React copies. The React Compiler's
useMemoCache accessed the wrong instance's dispatcher (null), crashing
the web build with a blank page.

- Align chat app to react@19.2.4 so Bun hoists a single copy
- Force Metro to resolve react/react-dom from apps/mobile/node_modules
  to prevent future monorepo hoisting issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@dhairyashiil dhairyashiil merged commit 6763915 into main Mar 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants