我正在使用Firebase云函数,最近日志显示了这个消息:
问题在于,当我将那段代码添加到我的函数文件中时,每次尝试部署时都会出现这个错误:The behavior for Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK. To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
const firestore = new Firestore(); const settings = {/* your settings... */ timestampsInSnapshots: true}; firestore.settings(settings);
ReferenceError: Firestore is not defined
有人能帮我找出问题所在吗?
(即使我已经使用Firestore功能,我是否需要在package.json文件中添加Firestore依赖项?)
谢谢