Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

868
Views
Error when trying to install react-redux dependency

I am getting an error trying to install the react-redux package onto my create-react-app application. I have tried deleting and reinstalling my node_modules folder as well as installing it with admin permissions and I am still receiving the same error

➜  frontend git:(main) ✗ npm i react-redux
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree

Here is the remaining output from the console

npm ERR! 
npm ERR! While resolving: frontend@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.3" from react-redux@7.2.1
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.

Here is the list of current dependencies in my package.json

 "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "axios": "^0.21.0",
    "react": "^17.0.1",
    "react-bootstrap": "^1.4.0",
    "react-dom": "^17.0.1",
    "react-router-bootstrap": "^0.25.0",
    "react-router-dom": "^5.2.0",
    "react-scripts": "3.4.4",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-thunk": "^2.3.0",
    "tachyons": "^4.12.0"
  },
over 4 years ago · Santiago Trujillo
7 answers
Answer question

0

It looks like you are using the latest npm version (v7). As mention in the logs, try with npm install --legacy-peer-deps


The last time npm Blog mentioned the --legacy-peer-deps flag was while their beta version of npm v7 got public. To read more about the flag go here.

over 4 years ago · Santiago Trujillo Report

0

Try installing recommended nodejs version(screen shot below). Which should fix this issue.

enter image description here

Here is a recreation of this error and its solution (screenshots below):

Problem:

Nodejs : Latest features:

enter image description here

Solution:

Nodejs : Recommended for most users:

enter image description here

Installing the Recommended version of node js fixed this issue instantly allowing installation of relevant dependancies.

Incase you are facing this issue with a react-native dependency then once you have installed the recommended version be sure to update your pod file.

over 4 years ago · Santiago Trujillo Report

0

Try using Node.js latest "Recommended For Most Users" Version . it worked for me

over 4 years ago · Santiago Trujillo Report

0

Try adding it with yarn. Worked for me

over 4 years ago · Santiago Trujillo Report

0

Two ways:

  1. npm install <package-name> --legacy-peer-deps
  2. install Recommended node version for most users

The better way is to install the recommended version of node to work for all packages.

over 4 years ago · Santiago Trujillo Report

0

Tried for Mac, it worked.. follow the steps for upgrading to the latest LTS

  1. Before updating the Node.js release, check which version you are currently using with: node -v

  2. Next, clear npm cache with the command: npm cache clean -f

  3. Install n globally: npm install -g n

  4. Now that you have n installed, you can use the module to install the latest stable release of Node.js: sudo n stable

Alternatively, you can install the Node.js release with the latest features:

sudo n latest

Or, install a specific version number with: n [version.number]

over 4 years ago · Santiago Trujillo Report

0

Its a little bit late but you can resolve this with --force or --legacy-peer-deps options. Either should work as mentioned in the error reported by npm

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!