0
votes

I am using FirebaseUI React Components (https://github.com/firebase/firebaseui-web-react) to implement FirebaseUI Auth in a React app, which has previously worked without any issues. However, I recently upgraded Firebase to v9, and now when I try to install FirebaseUI React Components I receive a dependency conflict. Specifically, when I try:

npm install --save react-firebaseui

I receive the 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.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"^8.2.4" from [email protected]
npm ERR! node_modules/react-firebaseui
npm ERR!   react-firebaseui@"*" 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.

Has anyone else working with FirebaseUI React Components, or FirebaseUI more broadly, encountered this error and found a solution? According to the Firebase docs, v9 is not compatible with FirebaseUI, and the issue I am encountering may be related to the issue here (https://github.com/firebase/firebaseui-web/issues/837) - however, if that's the case, is there any way to make FirebaseUI work after upgrading Firebase to v9?

1

1 Answers

0
votes

According to the Firebase docs, v9 is not compatible with FirebaseUI,

...

is there any way to make FirebaseUI work after upgrading Firebase to v9?

If you want to be adventurous and try to get these things working together, you can start with npm i --save firebaseui@next. At the time of this writing, that will install [email protected] which is presumably a pre-release for firebaseui@6 which is intended to add compatibility with firebase@9.

If you want to be really adventurous, you can try applying the change set at https://github.com/firebase/firebaseui-web/pull/850, but that appears to be undergoing active development (comments as of 3 days ago). Perhaps it will be merged and released in the not-too-distant future and hopefully your issue will be resolved by it.