segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
360 stars 185 forks source link

Throwing dependency issues when building for RN 0.74+ #994

Open pTinosq opened 4 weeks ago

pTinosq commented 4 weeks ago

We are looking to upgrade to RN 0.74.4 and have found that this package is throwing issues where the peer dependency with @react-native-async-storage/async-storage is not compatible. This error started appearing when we upgraded @react-native-async-storage/async-storage to v2.0.0. Would it be possible to update the library so it is compatible with 2.0.0?

Steps to reproduce

  1. Upgrade "@react-native-async-storage/async-storage": "^2.0.0"
  2. Try and run npm i

Expected behavior It should install all packages with no issue

Actual behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @segment/analytics-react-native@2.19.4
npm ERR! Found: @react-native-async-storage/async-storage@2.0.0
npm ERR! node_modules/@react-native-async-storage/async-storage
npm ERR!   @react-native-async-storage/async-storage@"^2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @react-native-async-storage/async-storage@"1.x" from @segment/analytics-react-native@2.19.4
npm ERR! node_modules/@segment/analytics-react-native
npm ERR!   @segment/analytics-react-native@"^2.19.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @react-native-async-storage/async-storage@1.24.0
npm ERR! node_modules/@react-native-async-storage/async-storage
npm ERR!   peerOptional @react-native-async-storage/async-storage@"1.x" from @segment/analytics-react-native@2.19.4
npm ERR!   node_modules/@segment/analytics-react-native
npm ERR!     @segment/analytics-react-native@"^2.19.4" 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.