Reputation: 1353
I have upgraded my project from Angular 10 -> 11.
After I have done that, I get errors like this:
I have imported firebase like this:
import firebase from '@firebase/app';
import '@firebase/database';
import '@firebase/firestore';
import '@firebase/auth';
import '@firebase/analytics';
import '@firebase/functions';
import '@firebase/storage';
Example where I get an error:
const firestoreDocRefs: firebase.firestore.DocumentReference[] = [];
and
analyticsRef: firebase.analytics.Analytics;
What has changed when going from Angular 10 -> 11 and how can I get the firebase namespace to work for me again?
Upvotes: 0
Views: 269
Reputation: 1353
After some experimenting I found that this works:
import firebase from 'firebase/app';
import 'firebase/database';
import 'firebase/firestore';
import 'firebase/auth';
import 'firebase/analytics';
import 'firebase/functions';
import 'firebase/storage';
Upvotes: 1