首页 > 解决方案 > 模拟 Firebase 数据库触发函数错误:尚不支持服务“firebaseio.com”

问题描述

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


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

这是结果,我的 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"
},

标签: firebasegoogle-cloud-functionsfirebase-cli

解决方案


解决了:

只是因为firebase对他们做了一个小改动,firebase-tools0.1版本的差异足以打破仿真。

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

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


推荐阅读