【发布时间】:2020-01-28 09:23:59
【问题描述】:
我正在努力在本地测试我的 firebase 功能。我的数据库模拟器似乎可以工作
✗ firebase serve --only database
i database: Emulator logging to database-debug.log
✔ database: Emulator started at http://localhost:9000
但是当我尝试一起启动所有模拟器时它没有启动
✗ firebase emulators:start
i Starting emulators: ["functions","hosting"]
✔ functions: Using node@10 from host.
✔ functions: Emulator started at http://localhost:5001
i hosting: Serving hosting files from: dist
✔ hosting: Local server: http://localhost:5000
✔ hosting: Emulator started at http://localhost:5000
i functions: Watching ".../functions" for Cloud Functions...
⚠ functions: Your GOOGLE_APPLICATION_CREDENTIALS environment variable points to .../ignore/fbkey.json. Non-emulated services will access production using these credentials. Be careful!
✔ functions[subscribe]: http function initialized (http://localhost:5001/xxx/us-central1/subscribe).
✔ functions[unsubscribe]: http function initialized (http://localhost:5001/xxx/us-central1/unsubscribe).
i functions[sendNotification]: function ignored because the database emulator does not exist or is not running. <-------- why does this happen
✔ All emulators started, it is now safe to connect.
我得到与firebase serve 相同的结果,但不知道下一步该怎么做?
【问题讨论】:
-
请在 firebase-tools github 上提出问题。 github.com/firebase/firebase-tools
标签: firebase google-cloud-functions firebase-cli