cri*_*unt 6 javascript firebase cloud-document-ai
我正在尝试部署 firebase 云功能,但不断收到此错误。最奇怪的部分是,我让它工作正常,但从 firebase 与云视觉对话切换到 firebase 与 google 文档对话。突然,这个错误出现了。我已经尝试了几个不同版本的 firebase 工具和 NodeJS,但尚未能够解决该问题。这是下面的错误。
[2023-02-28T17:29:15.917Z] Building nodejs source
[2023-02-28T17:29:15.922Z] Could not find functions.yaml. Must use http discovery
[2023-02-28T17:29:15.935Z] Found firebase-functions binary at 'C:\Users\crisb\source\repos\Javascriptcouldfunction4\functions\node_modules\.bin\firebase-functions'
[2023-02-28T17:29:17.570Z] Serving at port 8704
[2023-02-28T17:29:19.519Z] Got response from /__/functions.yaml Failed to generate manifest from function source: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Object
[2023-02-28T17:29:19.522Z] Failed to parse functions.yamlincomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 83:
... TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of t ...
^ {"name":"YAMLException","reason":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line","mark":{"name":null,"buffer":"Failed to generate manifest from function source: TypeError [ERR_INVALID_ARG_TYPE]: The \"id\" argument must be of type string. Received an instance of Object\n\u0000","position":82,"line":0,"column":82},"message":"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 83:\n ... TypeError [ERR_INVALID_ARG_TYPE]: The \"id\" argument must be of t ... \n ^"}
[2023-02-28T17:29:19.528Z] shutdown requested via /__/quitquitquit
Error: Failed to load function definition from source: Failed to generate manifest from function source: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Object
Run Code Online (Sandbox Code Playgroud)
我已经尝试了几个不同版本的 firebase 工具和 NodeJS,但尚未能够解决该问题。我从头开始重建了整个项目,但仍然遇到同样的问题。
小智 1
Firebase 用于定义云函数的配置文件functions.yaml似乎有问题。
以下是您可能需要考虑的一些选项:
functions目录是否位于项目中的正确位置。它应该位于项目的根目录中。functions目录包含必要的文件,包括index.js、package.json和functions.yaml。functions.yaml文件以确保其格式正确。它应包含每个函数的name、memory、timeout和字段。runtimefirebase init再次运行该命令以重新初始化您的 Firebase 项目。如果这些修复均不起作用,则可能存在 Firebase 错误。在这种情况下,您可以尝试联系Firebase 支持人员寻求建议。
| 归档时间: |
|
| 查看次数: |
3371 次 |
| 最近记录: |