Skip to content

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

Closed
@R3DST0RM

Description

@R3DST0RM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions