当我尝试向firebase写入一个映射时,我遇到了这个错误: FirebaseError: Function DocumentReference.set() called with invalid dataUnsupported field value: a custom Map object (found in field documentData.elements) 我希望将映射而不是数组写入firebase,以便能够在不覆盖整个数组的情况下合并数据集,而只添加或删除映射的条目。然而,我无法让地图工作
我在云函数上使用了firebase云函数和javascript。而且,我想从javascript切换到typescript。但是,我不能在typescript上使用firebase-admin,因为以下命令失败。command: npm install @types/firebase-admin --save-dev
error: '@types/firebase-admin' is not in the np
我检查了firebase控制台,看看是否记录了错误,但代码3只有一个错误。这意味着我写的代码是错误的。但事实是,它只是一个helloworld函数,在开始使用云函数时被注释掉了。我尝试过将语言从javascript转换为typescript,并尝试了不同的导入方法,但都无济于事。其他人也面临同样的问题吗?import * as functions from "firebase-functions";
import * as admin from 'firebase-admin