Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Description

react-native@0.83.1 requires react ^19.2.0, but the package currently constrains to 18.2 - 19.1, causing ERESOLVE errors during installation.

Updated React peer dependency range from 18.2 - 19.1 to 18.2 - 19.2 in packages/app/package.json and regenerated yarn.lock.

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

# Verify the peer dependency conflict is resolved
npx --package react-native-test-app@latest init --version 0.83

Should complete without ERESOLVE errors.

Original prompt

Problem

Issue #2637 reports that npx --package react-native-test-app@5.0.7 init fails with npm ERESOLVE error because:

  • react-native@0.83.1 requires react ^19.2.0
  • react-native-test-app@5.0.7 currently peers with react 18.2 - 19.1

This creates a peer dependency conflict that prevents installation.

Solution

Update the React peer dependency range in packages/app/package.json to support React 19.2:

Change the peerDependencies section:

"peerDependencies": {
  "@callstack/react-native-visionos": "0.76 - 0.79",
  "@expo/config-plugins": ">=5.0",
  "react": "18.2 - 19.2",
  "react-native": "0.76 - 0.83 || >=0.83.0-0 <0.84.0",
  "react-native-macos": "^0.0.0-0 || 0.76 - 0.79",
  "react-native-windows": "^0.0.0-0 || 0.76 - 0.80"
}

Specifically:

  • Change "react": "18.2 - 19.1" to "react": "18.2 - 19.2"

Update yarn.lock:
After updating package.json, regenerate the yarn.lock file by running yarn install in the repository root to ensure all dependencies are properly resolved.

Expected Outcome

  • ✅ Resolves npm ERESOLVE error when initializing with react-native@0.83.1
  • ✅ Maintains backward compatibility with React 18.2 - 19.1
  • ✅ Supports React 19.2.x which is required by react-native@0.83.1
  • ✅ Aligns with current stable React version (19.2.3)

Fixes #2637

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: tido64 <4123478+tido64@users.noreply.github.com>
Copilot AI changed the title [WIP] Update React peer dependency to support version 19.2 Update React peer dependency to support 19.2 Jan 15, 2026
Copilot AI requested a review from tido64 January 15, 2026 10:08
@tido64 tido64 marked this pull request as ready for review January 15, 2026 11:01
@tido64 tido64 requested a review from JasonVMo as a code owner January 15, 2026 11:01
@tido64 tido64 merged commit 0935466 into trunk Jan 15, 2026
29 of 30 checks passed
@tido64 tido64 deleted the copilot/update-react-peer-dependency branch January 15, 2026 11:02
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.

init fails with npm ERESOLVE: react-native@0.83.1 requires react ^19.2.0 but react-native-test-app@5.0.7 peers 18.2–19.1

2 participants