Home > Software engineering >  npm install --save react-with-firebase-auth console ERROR
npm install --save react-with-firebase-auth console ERROR

Time:06-04

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: [email protected]
npm ERR! Found: [email protected]
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 [email protected]
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?

CodePudding user response:

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

CodePudding user response:

You are trying to install the library [email protected] wich rely on firebase@"^8.6.8"( firebase versio 8.6.8) but in your project you are using firebase 9.8.2. It is a dependecy error.

  • Related