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
367 stars 191 forks source link

@segment/sovran-react-native package not updated on npm #1006

Closed admapop closed 5 days ago

admapop commented 1 month ago

Even though on github I can clearly see that the peer dependency for @react-native-async-storage/async-storage is now 2.x, on npm if you explore the code it's still 1.x, you can check link.

This means that in a project with @react-native-async-storage/async-storage: 2.0.0 I get the following error installing analytics-react-native

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: app-expo@1.0.0
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!   peerOptional @react-native-async-storage/async-storage@"2.x" from @segment/analytics-react-native@2.19.5
npm ERR!   node_modules/@segment/analytics-react-native
npm ERR!     @segment/analytics-react-native@"2.19.5" 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/sovran-react-native@1.1.2
npm ERR! node_modules/@segment/sovran-react-native
npm ERR!   @segment/sovran-react-native@"^1.1.2" from the root project
npm ERR!   peer @segment/sovran-react-native@"^1.1.0" from @segment/analytics-react-native@2.19.5
npm ERR!   node_modules/@segment/analytics-react-native
npm ERR!     @segment/analytics-react-native@"2.19.5" 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.

Steps to reproduce: Install latest sovran version (1.1.2), install latest @react-native-async-storage/async-storage, and then install latest analytics-react-native

Expected behavior Dependency resolution should not fail.

Actual behavior Dependency resolution fails

ajenkins commented 3 weeks ago

For anyone else stuck on this, I was able to workaround this by installing the package from Github using GitPkg.

Here's the install command I used:

npm install 'https://gitpkg.vercel.app/segmentio/analytics-react-native/packages/sovran?master'

Then I installed the other required dependencies.

admapop commented 3 weeks ago

For anyone else stuck on this, I was able to workaround this by installing the package from Github using GitPkg.

Here's the install command I used:


npm install 'https://gitpkg.vercel.app/segmentio/analytics-react-native/packages/sovran?master'

Then I installed the other required dependencies.

This is awesome thanks!

I ended up forking, building and bundling a .tar with my app.

Will keep GitPkg in mind.

kayakyakr commented 1 week ago

This same issue is blocking our team. Unfortunately, I don't think there's a workaround for us, as we're procuring these to an internal artifactory.

Would love some 👀 on this.

go-east commented 1 week ago

Same issue here. can you release NPM package?

kayakyakr commented 6 days ago

Created a PR to bump the version, dunno if there's automation to automatically release, but felt like a good idea.

alanjcharles commented 5 days ago

resolved in 1.1.3