Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase emulator被忽略函数的故障排除_Firebase_Google Cloud Firestore_Google Cloud Functions_Firebase Cli - Fatal编程技术网

Firebase emulator被忽略函数的故障排除

Firebase emulator被忽略函数的故障排除,firebase,google-cloud-firestore,google-cloud-functions,firebase-cli,Firebase,Google Cloud Firestore,Google Cloud Functions,Firebase Cli,我正在根据以下文档启动云函数模拟器: 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

我正在根据以下文档启动云函数模拟器:

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
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.
但如果有OnTigger功能,则下降平缓:

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
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.

OnTigger函数在本地被忽略的原因可能是什么?我相信Firestore可以在本地处理这些问题,因为文档中引用了“云函数模拟器,它可以模拟以下函数类型:…云Firestore函数。”我认为OnTigger可能是一个Cloud Firestore函数,但可能会混淆术语。

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

firebase emulators:start

现在,您正在为不涉及Firestore的函数启动emulator。有关更多信息,请参阅。

您所说的“onTrigger”功能是什么意思?我知道没有任何OnTigger类型的函数。是否要编辑问题以共享未部署的函数的代码?就像onWrite、onCreate一样。发生触发事件时运行的函数: