. Advertisement .
. Advertisement .
The error “ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login” 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.
What dose this error comes from?
When trying to use this command line to include Facebook login to your reactJs project:
You may encounter this error:
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
This error appears to be a problem with npm 7.x.
How To Solve The Error “ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login”?
Please consider including the –legacy-peer-deps option again, utilizing the following command line.
Option 1: Include legacy-peer-deps option in the command line
npm install react-facebook-login --legacy-peer-deps
rather than the following command:
npm install react-facebook-login
Option 2: Remove the node_modules, package-lock.json, and bundle utilizing yarn install
Simply use yarn install to remove node modules, package-lock.json, and bundle, and your problem will be resolved. Give this command a shot.
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
Just make sure that firestore comes with the version
12.7.1 and all other modules have
12.6.1, as firestore is an underlying module of other modules in order to ensure consistency. it should be identical version to its peers. Use –legacy-peer-deps and the result will be somewhat above.
Some way to add them the same version:
the command npm updateand all package will update to the most recent version. The version that is most likely to be where the second number is changed. It is also possible to use
the npm updateusing the specific package to update only the package you wish to for the purpose of resolving the issue.
Set up the specific version of the module by
npm install [package-name]@[version-number]
@react-native-firebase/[email protected] ├── @react-native-firebase/[email protected] ├── @react-native-firebase/[email protected]
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your “ERESOLVE unable to resolve dependency tree when installing npm react-facebook-login” error 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!