Hello Guys, How are you all? Hope You all Are Fine. I am trying to install Facebook login in my react project by npm react-facebook-login this command But I am facing this error ERESOLVE unable to resolve dependency tree 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 ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error Occurs ?
- How To Solve ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error ?
- Solution 1: Add legacy-peer-deps option in commandline
- Solution 2: delete the node_modules, package-lock.json, and bundle using yarn install
- Summery
How ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error Occurs ?
I am trying to install Facebook login my reactJs project by this command line.
npm react-facebook-login
But I am facing this error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: buckets@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
How To Solve ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error ?
- How To Solve ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error?
To Solve ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login Error This seems to be a problem in npm version 7.x. Please try again adding the
--legacy-peer-deps
option, Here is the command line that you should try.
Solution 1: Add legacy-peer-deps option in commandline
This seems to be a problem in npm version 7.x. Please try again adding the --legacy-peer-deps
option, Here is the command line that you should try.
Try This command
npm install react-facebook-login --legacy-peer-deps
instead of this command
npm install react-facebook-login
Solution 2: delete the node_modules, package-lock.json, and bundle using yarn install
I Just deleted the node_modules
, package-lock.json
, and bundle using yarn install
and My error was solved. Try this command.
rm -rf node_modules
rm package-lock.json
yarn install
# It will generates a yarn.lock file and a new package-lock.json
npm start
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
Thanks for solution