Error when trying to install react-redux dependency

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.


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.


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.