功能部署有错误。要继续部署其他功能(例如数据库),请运行:
firebase deploy --except functions
Error:
功能未正确部署。
尝试运行部署--debug
。例如:firebase --debug deploy
.
就我而言,该函数如下所示:
exports.test = functions.firestore.document('chats').onCreate((snap, context) => {
...
});
调试日志包含以下错误消息:
fieldViolations=[field=event_trigger, description=与正则表达式匹配的预期值聊天 [^/]+/[^/]+(/[^/]+/[^/]+)*]]
就在那时我意识到chats
不是文档而是集合。我将路径更改为集合的路径,一切正常。
EDIT:
要查看更多日志,您还可以尝试:
firebase functions:log
or
firebase functions:log --only <FUNCTION_NAME>
Link https://firebase.google.com/docs/functions/writing-and-viewing-logs#viewing_logs到文档。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)