Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Conflict with netinfo with latest Expo version #676

Closed
3 tasks done
VirenMohindra opened this issue Nov 29, 2023 · 4 comments Β· Fixed by #677
Closed
3 tasks done

Dependency Conflict with netinfo with latest Expo version #676

VirenMohindra opened this issue Nov 29, 2023 · 4 comments Β· Fixed by #677

Comments

@VirenMohindra
Copy link

βœ… Prerequisites

  • Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
  • Are you running the latest SDK version?
  • Are you reporting to the correct repository (magic-sdk)?

πŸ› Description

The latest Expo version expects@react-native-community/netinfo to be 9.3.10, but @magic-sdk/react-native-expo expects any version above 11.0.0.

This is flagged while running npm i as well as npx expo-doctor, and is causing instability in our app.

🧩 Steps to Reproduce

  1. Create an expo project
  2. Install magic with required peer dependencies
  3. Run npx expo-doctor

πŸ€” Expected behavior

I would expect no errors and no peer dependency issues.

πŸ’» Error Output from Terminal

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @react-native-community/[email protected]
npm ERR! node_modules/@react-native-community/netinfo
npm ERR!   @react-native-community/netinfo@"9.3.10" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @react-native-community/netinfo@">11.0.0" from @magic-sdk/[email protected]
npm ERR! node_modules/@magic-sdk/react-native-expo
npm ERR!   @magic-sdk/react-native-expo@"^22.3.2" 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! /.npm/_logs/2023-11-29T00_08_32_328Z-eresolve-report.txt

In this code sample, the last console.log() never returns anything.

🌎 Environment

Software Version(s) Comments
@magic-sdk/react-native-expo 22.3.2 latest magic-sdk version
@react-native-community/netinfo 9.3.10 netinfo version that expo expects
expo ~49.0.13 latest Expo version
react-native 0.72.6
@VirenMohindra
Copy link
Author

another issue - @react-native-community/netinfo latest version 11.1.1 does not work on Expo. so not only is there a peer dependency issue, its just flat out broken. the modal does not show up.

@romin-halltari
Copy link
Contributor

Thank you for reporting this @VirenMohindra, will submit a new version with the fix today.

@romin-halltari
Copy link
Contributor

@VirenMohindra The fix has been released on version 22.3.4. Please let us know if any other issues arise.

@VirenMohindra
Copy link
Author

Dependency conflict seems to be fixed. "expo": "~49.0.13", works with "@react-native-community/netinfo": "9.3.10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants