Skip to content

Unable to install sentry sdk #1328

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

Closed
jenipharachel opened this issue Feb 3, 2021 · 6 comments
Closed

Unable to install sentry sdk #1328

jenipharachel opened this issue Feb 3, 2021 · 6 comments

Comments

@jenipharachel
Copy link

Environment

How do you use Sentry?
@sentry/[email protected] for tracking mobile app errors

Which SDK and version?
@sentry/[email protected]

Steps to Reproduce

I followed the installation steps from this site https://docs.sentry.io/platforms/react-native/

npm install --save @sentry/react-native -----> command stated that there were dependency issue.

Expected Result

successful installation of sentry sdk but it failed

Actual Result

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"16.13.1" from the root project
npm ERR!   peer react@">=16.4.1" from @sentry/[email protected]
npm ERR!   node_modules/@sentry/react-native
npm ERR!     @sentry/react-native@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from [email protected]
npm ERR! node_modules/@sentry/react-native/node_modules/react-dom
npm ERR!   peer react-dom@"15.x || 16.x || 17.x" from @sentry/[email protected]
npm ERR!   node_modules/@sentry/react-native/node_modules/@sentry/react
npm ERR!     @sentry/react@"6.0.3" from @sentry/[email protected]
npm ERR!     node_modules/@sentry/react-native
npm ERR!       @sentry/react-native@"*" 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! See /home/jenipha/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jenipha/.npm/_logs/2021-02-03T11_33_25_304Z-debug.log

Please help me find what the issue might be and my react-native version is "react": "16.13.1" and "react-native": "0.63.2",

@jennmueng
Copy link
Member

@jenipharachel Try bumping your react up to at least version 17.0.1.

@jenipharachel
Copy link
Author

@jennmueng Would that disrupt other dependencies like the other libraries I have used for my application?

@jennmueng
Copy link
Member

@jenipharachel Never mind this is my mistake, 16.13.1 is the correct version corresponding to your React Native version. Does it work if you pass --legacy-peer-deps when doing the npm install? We will need to solve this issue upstream as it's coming from @sentry/react.

@jenipharachel
Copy link
Author

jenipharachel commented Feb 5, 2021

@jennmueng Thanks! npm install --save @sentry/react-native --legacy-peer-deps worked

@bramski
Copy link

bramski commented Feb 10, 2021

👍 Experiencing this issue with 2.2.0 as well and this did allow me to install. The dependency from sentry-react-native for react-dom needs to be loosened please.

@jennmueng
Copy link
Member

Closing this to consolidate with #1065

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

No branches or pull requests

3 participants