Firebase-tools: 函数被忽略,因为数据库模拟器不存在或未运行

创建于 2020-06-14  ·  3评论  ·  资料来源: firebase/firebase-tools

[必需] 环境信息

包.json:
"firebase-admin": "^8.12.1",
“firebase 功能”:“^3.7.0”,

firebase 工具:
8.4.2

平台:
视窗

[必需] 测试用例

firebase模拟器:开始

[必需] 重现步骤

  1. https://github.com/firebase/functions-samples/tree/master/child-count
  2. 统计模拟器
  3. 开始使用数据库触发器服务功能
  4. 你会得到“功能被忽略”的问题

[必需] 预期行为


功能应与 Firestore 模拟器连接

[必需] 实际行为

!  Your requested "node" version "8" doesn't match your global version "10"
i  functions: Watching "D:\Workspace\a\Cloud Functions\project\functions" for Cloud Functions...
+  functions[helloWorld]: http function initialized (http://localhost:5000/[project-id]/us-central1/helloWorld).
i  functions[countentitities]: function ignored because the database emulator does not exist or is not running.

最有用的评论

@ahmadalibaloch这按预期工作。 您只运行函数模拟器,而不是数据库模拟器。

如果你想同时运行,首先运行firebase init emulators并设置数据库模拟器,然后再次运行firebase emulators:start

所有3条评论

@ahmadalibaloch这按预期工作。 您只运行函数模拟器,而不是数据库模拟器。

如果你想同时运行,首先运行firebase init emulators并设置数据库模拟器,然后再次运行firebase emulators:start

从模拟器的 UI 我可以访问 Firestore 模拟器并对数据库进行更改,一切正常。
我用firebase init emulators设置了模拟器,但是当我在启动模拟器后提供功能时,它给了我消息function ignored bcause the database emulator does not exist....

@ahmadalibaloch这只是没有足够的信息来调试。 请至少显示来自emulators:start的调试日志,这些日志显示数据库模拟器正在运行但功能模拟器无法识别它。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

alexsandracodes picture alexsandracodes  ·  48评论

serbanstef picture serbanstef  ·  61评论

thiagobonfante picture thiagobonfante  ·  45评论

ymainier picture ymainier  ·  151评论

gaeldestrem picture gaeldestrem  ·  39评论