Firebase: Troubleshooting “The default Firebase app does not exist…”
If like me, you’ve came across one of the following error while trying access FirebaseAdmin’s services, i.e.:
- “The default Firebase app does not exist…”
- “_this.ensureApp(…).firestore is not a function”
- “TypeError: firebaseApp.getOrInitService is not a function”
The solution is simply doing the following:
Explanation: Using the first element in admin.apps (App), instead of the default app (admin.app).