I am trying to install Firebase Authentification in my react project and i wrote in the command line of the VSCode :
npm install --save firebase react-with-firebase-auth
But it only shows this ERROR:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: proiect2-app@0.1.0
npm ERR! Found: firebase@9.8.2
npm ERR! node_modules/firebase
npm ERR! firebase@"^9.8.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"^8.6.8" from react-with-firebase-auth@1.4.1
npm ERR! react-with-firebase-auth@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Do you know what should I do in this case?
>Solution :
react-with-firebase-auth is depending on Firebase version 8.6.8. The current version you use is 9.8.2, so react-with-firebase-auth is not compatible. So either you have to change your Firebase version from 9.8.2 in your package.json, or you have to find a new library that is compatible with newer version of Firebase