TypeError: this.firebaseApp.functions is not a function when upgrading to firebase 9; angularFire 7 #2950
-
Hey all, while trying to get the upgrade working, seems that the way I'm calling a function doesn't work anymore. Version infoAngular: Firebase: AngularFire: Other (e.g. Ionic/Cordova, Node, browser, operating system): How to reproduce these conditionsThe code I have (I've shortened it a bit, but the important things are there): import { FirebaseApp } from '@angular/fire/compat'; @Injectable() This gives the error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
This comment has been hidden.
This comment has been hidden.
-
You should inject functions, |
Beta Was this translation helpful? Give feedback.
You should inject functions,
AngularFireFunctions
in your constructor and make sure your importingAngularFireFunctionsModule
in your AppModule for best experience. It's likely something is getting tree-shaken out, or your "side-effect" import (import 'firebase/functions'
) was not converted to compat, injectingAngularFireFunctions
means you don't have to worry about any of that.