繁体   English   中英

使用 FieldValue 或 FirestoreAdminClient 时未定义

[英]Getting undefined when using FieldValue or FirestoreAdminClient

正如标题所示,我正在尝试使用 FieldValue 和 FirestoreAdminClient,如下所示:

const client = new admin.firestore.v1.FirestoreAdminClient();

在我的服务器的另一个 function 中:

await db.doc("stats/users").update({
  total: admin.firestore.FieldValue.increment(1),
});

但是当我运行我的 function 时,我得到:

TypeError:无法读取未定义的属性(读取“FirestoreAdminClient”)

我不知道发生了什么以及为什么。 如果您有任何建议,请分享

我不知道发生了什么。 我完全卸载了节点并重新安装它,它现在可以工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM