ProductName: Mac OS X
ProductVersion: 10.14.4
BuildVersion: 18E226
"firebase-admin": "5.12.1",
When I call Firebase.initializeApp() more than once, I get this error:
Error: The default Firebase app already exists. This means you called initializeApp() more than once without providing an app name as the second argument. In most cases you only need to call initializeApp() once. But if you do want to initialize multiple apps, pass a second argument to initializeApp() to give each app a unique name.
Its really annoying because I want to create isolated servers for each test without having to run a separate instance of Node. Can you please fix this so more than one can run side-by-side?
I found a few problems with this issue:
There's nothing to fix. This is how this API is expected to work. If you want to run multiple instances of FirebaseApp, you need to give them different names. See https://firebase.google.com/docs/reference/admin/node/admin.app.App.html#name for some examples.
Interesting. So I can make up a random string each time?
That's up to you. As far as the SDK is concerned, each instance of FirebaseApp must have a different name.
Most helpful comment
There's nothing to fix. This is how this API is expected to work. If you want to run multiple instances of FirebaseApp, you need to give them different names. See https://firebase.google.com/docs/reference/admin/node/admin.app.App.html#name for some examples.