I just imported the admin to resolve this error, but it still did not work after a while.
Here are some changes:
- change the .firebaserc, this file defines the project but does not use the name, Find the project ID on your firebase(such as beaudible-xxx).
- according to Firebase & Astro change the initServer.ts.
- replace
localhost with 127.0.0.1 in the initServer.ts.
Related Links
I just imported the admin to resolve this error, but it still did not work after a while.
Here are some changes:
localhostwith127.0.0.1in the initServer.ts.Related Links
Firebase.initializeAppthrowingdefault Firebase app already existserrors in Next.js apps. firebase/firebase-admin-node#2111