Open anthonycastelli opened 2 years ago
+1
I was trying to instantiate a Firestore instance (using firebase-admin@^10.0.2
vs the firebase-admin@^9.6.0
from this package) and it seems using credentials.cert(..)
isn't evaluating this instanceof
check to true:
https://github.com/firebase/firebase-admin-node/blob/master/src/firestore/firestore-internal.ts#L62
And then subsequently the error from Firestore:
'Failed to initialize Google Cloud Firestore client with the available credentials. Must initialize the SDK with a certificate credential or application default credentials to use Cloud Firestore API.'
...
at getFirestoreOptions (xxx/node_modules/@tfarras/nestjs-firebase-admin/node_modules/firebase-admin/lib/firestore/firestore-internal.js:82:11
But downgrading my firebase-admin
to the same as this package fixes this.
Because this lib will install its own firebase-admin package (v9). To avoid it, add to your package.json
"resolutions": {
"firebase-admin": "^11.3.0"
},
The Firebase Admin SDK is a bit outdated, any chance we can get that bumped up along with the latest version of any other package that needs it?
Running
nom outdated
is returning all of these