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

Unable to resolve peer dependency react-native on react-native@0.73.0 #2106

Closed
1 task done
R3DST0RM opened this issue Dec 11, 2023 · 1 comment · Fixed by #2107
Closed
1 task done

Unable to resolve peer dependency react-native on react-native@0.73.0 #2106

R3DST0RM opened this issue Dec 11, 2023 · 1 comment · Fixed by #2107

Comments

@R3DST0RM
Copy link
Contributor

R3DST0RM commented Dec 11, 2023

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

  • React: 18.2.0
  • ReactDOM/React Native: 0.73.0 (React-Native)
  • Redux: 5.0.0
  • React Redux: 9.0.3 (trying to install)

What is the current behavior?

Trying to install react-redux@9.0.3 causes NPM to throw a could not resolve dependency error.

npm ERR! While resolving: react-redux@9.0.3
npm ERR! Found: react-native@0.73.0
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional react-native@"^0.69.0" from react-redux@9.0.3
npm ERR! node_modules/react-redux
npm ERR!   react-redux@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-native@0.69.12
npm ERR! node_modules/react-native
npm ERR!   peerOptional react-native@"^0.69.0" from react-redux@9.0.3
npm ERR!   node_modules/react-redux
npm ERR!     react-redux@"*" 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.

The problem is reproducible by:

npx react-native@latest init Foo
cd Foo
npm install --save redux redux-thunk reselect
npm install --save react-redux 

What is the expected behavior?

Installation should succeed without any error

Which browser and OS are affected by this issue?

macOS

Did this work in previous versions of React Redux?

  • Yes
@markerikson
Copy link
Contributor

sigh that probably needs to be a >=, I guess.

I hate NPM's peer dep handling.

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

Successfully merging a pull request may close this issue.

2 participants