繁体   English   中英

解决Firebase模拟器的忽略功能

[英]Troubleshooting ignored functions for Firebase emulator

我正在根据此处的文档启动我的云功能仿真器:

firebase emulators:start --only functions

对于onRequest函数,事情看起来很顺利:

i  Starting emulators: ["functions"]
⚠  Your requested "node" version "8" doesn't match your global version "10"
✔  functions: Emulator started at http://localhost:5001
i  functions: Watching "/Users/.../functions" for Cloud Functions...
i  functions: HTTP trigger initialized at http://localhost:5001/sweever-prod/us-central1/sendMailTrigger
i  functions: HTTP trigger initialized at http://localhost:5001/sweever-prod/us-central1/sitemapData

但是在使用onTrigger函数时会下降:

Ignoring trigger "newUserSignedUp" because the Cloud Firestore emulator is not running.
Ignoring trigger "newItemAdded" because the Cloud Firestore emulator is not running.
Ignoring trigger "itemUpdated" because the Cloud Firestore emulator is not running.

onTrigger函数在本地被忽略的原因是什么? 根据文档参考,我被认为Firestore 可以在本地处理这些问题:“可以模拟以下功能类型的Cloud Functions仿真器:... Cloud Firestore函数。” 我认为onTrigger将是Cloud Firestore函数,但可能会混淆术语。

如果要为多个产品(主机和Firestore)运行仿真器,则应使用以下命令启动仿真器:

firebase emulators:start

现在,您只是为不涉及Firestore的功能启动模拟器。 请参阅文档以获取更多信息。

暂无
暂无

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

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