Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript Firebase云函数导入FireStore错误_Typescript_Firebase_Google Cloud Firestore_Google Cloud Functions - Fatal编程技术网

Typescript Firebase云函数导入FireStore错误

Typescript Firebase云函数导入FireStore错误,typescript,firebase,google-cloud-firestore,google-cloud-functions,Typescript,Firebase,Google Cloud Firestore,Google Cloud Functions,我正在编写云函数,Firestore是这样自动导入的 import * as functions from 'firebase-functions'; import { QuerySnapshot } from '@google-cloud/firestore'; const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); const membersSnapshot

我正在编写云函数,Firestore是这样自动导入的

 import * as functions from 'firebase-functions';
 import { QuerySnapshot } from '@google-cloud/firestore';
 const admin = require('firebase-admin');
 admin.initializeApp(functions.config().firebase);

const membersSnapshot: QuerySnapshot = await admin.firestore.doc('team/' + groupId + '/members').get()
但在部署时,错误如下所示。 我试着这样做,它部署没有任何错误,但我不确定这是正确的方式与否

const membersSnapshot: Array<functions.firestore.DocumentSnapshot> = await admin.firestore.doc('team/' + groupId + '/members').get()
const membersSnapshot:Array=wait admin.firestore.doc('team/'+groupId+'/members').get()
有人知道吗

node_modules/@googlecloud/firestore/types/firestore.d.ts:28:15- 错误TS2300:重复的标识符“DocumentData”

28导出类型DocumentData={[字段:字符串]:any}; ~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:35:15- 错误TS2300:重复的标识符“UpdateData”

35导出类型UpdateData={[fieldPath:string]:any}; ~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:86:16- 错误TS2300:重复的标识符“Firestore”

86出口级消防商店{ ~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:176:16- 错误TS2300:重复标识符“GeoPoint”

176出口级地质点{ ~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:203:16- 错误TS2300:重复的标识符“事务”

203出口类交易{ ~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:320:16- 错误TS2300:重复的标识符“WriteBatch”

320导出类写回{ ~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:414:14- 错误TS2717:后续属性声明必须具有相同的 类型。属性“lastUpdateTime”的类型必须为“string”,但此处 具有类型“Timestamp”

414只读lastUpdateTime?:时间戳; ~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:446:16- 错误TS2300:重复的标识符“WriteResult”

446导出类WriteResult{ ~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:469:16- 错误TS2300:重复标识符“DocumentReference”

469导出类文档参考{ ~~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:609:16- 错误TS2300:重复标识符“DocumentSnapshot”

609导出类文档快照{ ~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:678:16- 错误TS2300:重复标识符“QueryDocumentSnapshot”

678导出类QueryDocumentSnapshot扩展DocumentSnapshot{ ~~~~~~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:705:15- 错误TS2300:重复标识符“OrderByDirection”

705导出类型OrderByDirection='desc'|'asc'; ~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:711:15- 错误TS2300:重复标识符“WhereFilterOp”

711导出类型,其中Filterop=“”| '数组包含'; ~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:717:16- 错误TS2300:重复的标识符“查询”

717导出类查询{ ~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:925:16- 错误TS2300:重复标识符“QuerySnapshot”

925导出类查询快照{ ~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:977:15- 错误TS2300:重复标识符“DocumentChangeType”

977导出类型DocumentChangeType=“已添加”|“已删除”| "修改",; ~~~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:1020:16- 错误TS2300:重复的标识符“CollectionReference”

1020导出类集合引用扩展查询{ ~~~~~~~~~~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:1071:16- 错误TS2300:标识符“FieldValue”重复

1071导出类字段值{ ~~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:1132:16- 错误TS2300:标识符“FieldPath”重复

1132导出类字段路径{ ~~~~~~~~~

node_modules/@googlecloud/firestore/types/firestore.d.ts:1243:12- 错误TS2300:重复标识符“FirebaseFirestore”

1243出口=FirebaseFirestore; ~~~~~~~~~~~~~~~~~

node_modules/firebase admin/node_modules/@google cloud/firestore/types/firestore.d.ts:28:15-错误TS2300:重复标识符“DocumentData”

28导出类型DocumentData={[字段:字符串]:any}; ~~~~~~~~~~~~

node_modules/firebase admin/node_modules/@google cloud/firestore/types/firestore.d.ts:35:15-错误TS2300:重复标识符“UpdateData”

35导出类型UpdateData={[fieldPath:string]:any}; ~~~~~~~~~~

node_modules/firebase admin/node_modules/@google cloud/firestore/types/firestore.d.ts:46:16-错误TS2300:重复标识符“firestore”

46出口级消防仓库{ ~~~~~~~~~

node_modules/firebase admin/node_modules/@googlecloud/firestore/types/firestore.d.ts:122:16 -错误TS2300:重复标识符“GeoPoint”

122出口级地质点{ ~~~~~~~~

node_modules/firebase admin/node_modules/@goo
"firebase-admin": "6.0.1"
"firebase-admin": "6.0.0"