firebase / firebase/firebase-admin-node

admin.credential.cert Invalid or unexpected token

Offen
#2,276 10 Kommentare 1 Reaktion 1 zugewiesene Person Zugewiesen an @lahirumaramba Auf GitHub ansehen
api: firestore
Vorherrschende Sprache
TypeScript
Sterne
1.7k
Forks
419
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
16

Beschreibung

I took this package to the latest version 11.10.1, I always use this variation to connect to the database

`admin.initializeApp({
credential: admin.credential.cert({
'projectId': '----',
'privateKey':
'-----BEGIN PRIVATE KEY-----\n....\n-----END PRIVATE KEY-----\n',
'clientEmail':
'-----@----.iam.gserviceaccount.com',
}),
databaseURL: `https://pickapp-cl-qa-279013.firebaseio.com`,
});`

but now It's throwing this exception

` const initialSettings = this.firestoreSettings.get(databaseId) ?? {};
SyntaxError: Invalid or unexpected token
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)`

I have tested this from version 11.3.0 and below and it works as expected

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.