我只是更新 Node 14 到 16。
但现在我的 firebase 模拟器套件日志中有一个关于 cloud_functions 的警告
Unsupported function type on functionName., Expected either httpsTrigger or eventTrigger
有nodejs函数package.json的依赖
"engines": {
"node": "16"
},
"main": "lib/index.js",
"dependencies": {
"@types/geopoint": "^1.0.1",
"algoliasearch": "^4.12.0",
"firebase-admin": "^10.0.2",
"firebase-functions": "^3.18.0",
"firebase-tools": "^10.3.1",
"ts-geopoint": "^1.0.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"firebase-functions-test": "^0.2.0",
"typescript": "^4.5.4"
},
"private": true
你知道问题所在吗?
感谢帮助
最佳答案
我认为你的问题已经解决了(至少在 master 上 😉)。 参见 https://github.com/firebase/firebase-tools/issues/4313和 https://github.com/firebase/firebase-tools/pull/4314 .
更新:
正如 Baptiste 所说,该错误已在 10.4.0 版本中修复。
关于node.js - Firebase Function Emulator 函数名称上不支持的函数类型。预期为 httpsTrigger 或 eventTrigger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71512900/