Home > Software engineering >  What is the Firebase Authentication import for Angular 14
What is the Firebase Authentication import for Angular 14

Time:07-11

enter image description here

Here's one of the node_modules/firebase

enter image description here

Somewhere I found that I should use this import but as you see, this path doesn't exist. Any suggestions?

import firebase from 'firebase/compat/app';

CodePudding user response:

firebase/compat appeared only in firebase v9, i see you are using "firebase": "^7.9.0" in your package json so npm will install latest version prior to v8.

To check installed firebase version - see package.json file inside node_modules/firebase directory.

To use import firebase from 'firebase/compat/app'; as per your guides - update firebase version in your package.json file and rerun npm install. Latest version is 9.9.0 so it will be "firebase": "~9.9.0" or "firebase": "^9.9.0"

More details at https://firebase.google.com/docs/web/modular-upgrade

  • Related