firebase / firebase/firebase-admin-node

admin.credential.cert Invalid or unexpected token

Đang mở
#2,276 10 bình luận 1 reaction 1 người được giao Được giao cho @lahirumaramba Xem trên GitHub
api: firestore
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.