简体   繁体   中英

Troubleshooting ignored functions for Firebase emulator

I'm starting my cloud function emulator according to the documentation here:

firebase emulators:start --only functions

Things look smooth for the onRequest functions:

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

but falls flat when there are onTrigger functions:

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.

What might the cause of onTrigger functions being ignored locally? I'm led to believe Firestore can handle these locally given the documentation's reference: "Cloud Functions emulator which can emulate the following function types: ... Cloud Firestore functions." I think the onTrigger would be a Cloud Firestore function but might be confusing the terminology.

If you want to run the emulators for multiple products (Hosting and Firestore), you should be starting the emulator with the command:

firebase emulators:start

Right now, you are just starting the emulator for functions that don't involve Firestore. Please refer to the documentation for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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