我正在使用 Android Studio 做一个项目。将目录更改到另一个位置后。我收到错误“无法将进程工作目录设置为 [我的旧目录路径]:无法 setcwd()(错误号 2:没有这样的文件或目录)”
我在遵循此处使用 count() 聚合的示例时遇到错误
我的代码是:
const collectionRef = db.collection('cities');
const snapshot = await collectionRef.count().get();
const amount = snapshot.data().count;
res.json({ amount });
Run Code Online (Sandbox Code Playgroud)
错误说:
函数:类型错误:collectionRef.count不是函数
有人可以帮忙吗?