簡體   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