更新:已解决!在firebase-tools
NPM包需要更新到最新版本。
我试图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"
},
解决了:
仅仅是因为firebase对它们进行了很小的更改,firebase-tools
而0.1版本的差异足以破坏仿真。
只需运行即可npm install -g firebase-tools
解决此问题。
软件包版本从[email protected]
到[email protected]
...
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句