Update to the latest version of React Native peer dependency
cjones26 opened this issue · comments
Bug report
Summary
Need to update to the latest version of React Native, as we currently receive an error when installing the latest version with React Native 0.74.1
.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: testapp@1.0.0
npm ERR! Found: react-native@0.74.1
npm ERR! node_modules/react-native
npm ERR! react-native@"0.74.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.73.0" from @react-native-community/datetimepicker@8.0.0
npm ERR! node_modules/@react-native-community/datetimepicker
npm ERR! @react-native-community/datetimepicker@"8.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/charlesjones/.npm/_logs/2024-05-10T15_35_16_564Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/charlesjones/.npm/_logs/2024-05-10T15_35_16_564Z-debug-0.log
Reproducible sample code
package.json
"@react-native-community/datetimepicker": "8.0.0",
Steps to reproduce
- Attempt to install
@react-native-community/datetimepicker@8.0.0
in conjunction withreact-native@0.74.1
.
Describe what you expected to happen:
- Run
npm i
- Do not receive an error.
Environment info
Expo 51.
npx react-native info
output:
info Fetching system and libraries information...
System:
OS: macOS 14.4.1
CPU: (10) arm64 Apple M1 Pro
Memory: 494.59 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.19.1
path: /opt/homebrew/opt/node@18/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.4
path: /opt/homebrew/opt/node@18/bin/npm
Watchman:
version: 2024.03.25.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/charlesjones/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK:
API Levels:
- "31"
- "33"
- "34"
Build Tools:
- 30.0.2
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
System Images:
- android-33 | ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google APIs Intel x86_64 Atom
- android-33 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 3.1.2
path: /Users/charlesjones/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.1
wanted: 0.74.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Time zone name (If the problem you have is related to unexpected time / date. See list in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
datetimepicker version: 8.0.0
iOS / Android version: N/A
I have the same issue
I tried to make an PR but had huge issues trying to run the Detox tests :(.
I tried to make an PR but had huge issues trying to run the Detox tests :(.
npm i @react-native-community/datetimepicker@latest --legacy-peer-deps
adding --legacy-peer-deps seems to be working
I'd really like to avoid doing this, so hopefully someone can get an appropriate MR up soon!
You can also add to your package.json
:
"overrides": {
"@react-native-community/datetimepicker": {
"react-native": "0.74.1"
}
},
But yeah, the library should be updated and have a new release, especially as Expo recommends to use this library which should be compatible with new architecture, but if it can't be installed with expo 51, it doesn't really make sense 😄
Hello and thanks for reporting,
this should be fixed with 8.0.1
Thank you 🙂