【问题标题】:Emulating Firebase Database Trigger Function Error: the service "firebaseio.com" is not yet supported模拟 Firebase 数据库触发函数错误:尚不支持服务“firebaseio.com”
【发布时间】:2019-10-10 05:17:10
【问题描述】:

更新:已解决! firebase-tools npm 包需要更新到最新版本。


我正在尝试在终端中使用 Firebase 的 firebase experimental:functions:shell 命令模拟/测试我的云功能(特别是数据库触发器)。

这是结果,我的 HTTP 函数模拟但每个 Firebase 数据库 触发函数都会出错:

Your requested "node" version "6" doesn't match your global version "8"
✔  functions: Emulator started at http://localhost:5001
i  functions: Watching "/Users/****/Documents/Websites/***** - Other/cloud-functions/" for Cloud Functions...
⚠  Default "firebase-admin" instance created!
⚠  Ignoring trigger "CF_NAME_HIDDEN_1" because the service "firebaseio.com" is not yet supported.
⚠  Ignoring trigger "CF_NAME_HIDDEN_2" because the service "firebaseio.com" is not yet supported.
⚠  Ignoring trigger "CF_NAME_HIDDEN_3" because the service "firebaseio.com" is not yet supported.
i  functions: HTTP trigger initialized at http://localhost:5001/****-****/us-central1/CF_NAME_HIDDEN_4

我不明白为什么会收到此错误或它的含义:

忽略触发器...因为“firebaseio.com”服务尚不受支持。

我的 package.json 包括:

"firebase": "4.6.2",
"firebase-admin": "^7.4.0",
"firebase-functions": "^2.2.1",
...
"devDependencies": {
   "firebase-functions-test": "^0.1.6"
},

【问题讨论】:

标签: firebase google-cloud-functions firebase-cli


【解决方案1】:

已解决:

这仅仅是因为 firebase 对他们的 firebase-tools 做了一个小改动,而 0.1 版本的差异足以打破模拟。

只需运行 npm install -g firebase-tools 即可解决问题。

软件包版本从 firebase-tools@6.9.2 变为 firebase-tools@6.10.0...

【讨论】:

    猜你喜欢
    • 2019-02-22
    • 2021-04-19
    • 1970-01-01
    • 2016-11-13
    • 2018-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-06
    相关资源
    最近更新 更多