firebase / firebase/firebase-admin-node

admin.credential.cert Invalid or unexpected token

未关闭
#2,276 10 条评论 1 个 reaction 已指派 1 人 已指派给 @lahirumaramba 在 GitHub 查看
api: firestore
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。