. Advertisement .
..3..
. Advertisement .
..4..
The error: “Unable to resolve dependency tree Reactjs” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
How To Solve The Error: “Unable to resolve dependency tree Reactjs”?
You may receive the exception below when utilizing the npm install command to install npm packages:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
This problem is caused by npm version 7.x. Simply use the –legacy-peer-deps option instead. It is the same as the command below: npm install –save react-tinder-card –legacy-peer-deps.
Approach 1:
Simply utilize the following command line instead of the one you’re currently using.
npm install --save react-tinder-card --legacy-peer-deps
Approach 2:
This problem is caused by npm version 7.x. Simply use the –legacy-peer-deps option instead.
Approach 3:
Try downgrading to npm version 6. It should resolve your problem.
npm install -g npm@6
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “Unable to resolve dependency tree Reactjs” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Leave a comment