react-native@0.85.3 peerDependencies allow react@19.2.6 but embedded renderer requires exact 19.2.3
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
react-native@0.85.3 declares this peer dependency:
{
"react": "^19.2.3"
}
That allows package managers to install react@19.2.6, but the embedded React Native renderer in the same package appears to require react@19.2.3 exactly at runtime.
In Libraries/Renderer/implementations/ReactNativeRenderer-dev.js from react-native@0.85.3:
var isomorphicReactPackageVersion = React.version;
if ("19.2.3" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
);
The renderer internals also report:
version: "19.2.3",
rendererPackageName: "react-native-renderer",
reconcilerVersion: "19.2.3"
So the install-time contract says react@19.2.6 is acceptable, while the runtime contract rejects it.
Steps to reproduce
- Install
react-native@0.85.3. - Install
react@19.2.6andreact-dom@19.2.6. - Launch a React Native app.
Expected behavior
The package metadata should prevent installing a React version that the embedded renderer will reject at runtime, or tooling/docs should make this exact-version requirement explicit enough to catch before app launch.
For example, one of these would avoid the mismatch:
- narrow
react-native@0.85.3'speerDependencies.reactto the exact renderer-compatible version,19.2.3, or - add install/doctor guidance that
reactmust exactly match the embeddedreact-native-rendererversion, not just satisfy the semver peer range.
Actual behavior
react@19.2.6 satisfies ^19.2.3, but the app fails at runtime because the embedded react-native-renderer is 19.2.3.
Environment
Observed from package contents:
{
"reactNativeVersion": "0.85.3",
"reactPeer": "^19.2.3",
"rendererCheck": "19.2.3",
"rendererVersion": "19.2.3"
}
This came up in a pnpm monorepo where web packages resolve react@19.2.6 and an Expo/RN mobile app correctly needs react@19.2.3. The monorepo context made the mismatch more visible, but the underlying issue seems to be that the package metadata permits a React patch version that the renderer rejects.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
So sánh dependency peer react trong metadata của package với các kiểm tra phiên bản chính xác trong Libraries/Renderer/implementations/ReactNativeRenderer-dev.js. Tái hiện việc cài đặt với react@19.2.6, sau đó xác định liệu package contract hoặc hướng dẫn có nên ngăn chặn sự không khớp khi runtime hay không; được xem là hoàn tất khi các phiên bản React được hỗ trợ bị từ chối hoặc được xác định rõ ràng trước khi ứng dụng khởi chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100