close

[Solved] Unable to resolve dependency tree Reactjs

Hello Guys, How are you all? Hope You all Are Fine. Today I am installing npm packages and suddenly I got the following error Unable to resolve dependency tree error when installing npm packages in ReactJs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Unable to resolve dependency tree Reactjs Error Occurs ?

When trying to install the npm packages using npm install the command I am getting the following exception:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: tinder-clone@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

How To Solve Unable to resolve dependency tree Reactjs Error ?

  1. How To Solve Unable to resolve dependency tree Reactjs Error ?

    To Solve Unable to resolve dependency tree Reactjs Error This error comes from version 7.x of npm. Please try with the --legacy-peer-deps option. same as below command. npm install –save react-tinder-card –legacy-peer-deps.

  2. Unable to resolve dependency tree Reactjs

    To Solve Unable to resolve dependency tree Reactjs Error This error comes from version 7.x of npm. Please try with the --legacy-peer-deps option. same as below command. npm install –save react-tinder-card –legacy-peer-deps.

Solution 1

Just Use this command line instead of what you are using.

npm install --save react-tinder-card --legacy-peer-deps

Solution 2

This error comes from version 7.x of npm. Please try with the --legacy-peer-deps option.

Solution 3

Downgrade to npm v6. It should fix the issue.

npm install -g npm@6

Solution 4

You Should Downgrade the node to version 12.14.1 And Then Your Error will be solved. One Of Our Readers Commented on this suggestion.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

4 thoughts on “[Solved] Unable to resolve dependency tree Reactjs”

Leave a Comment