【问题标题】:Cloud Functions not being uploaded - Firebase [closed]Cloud Functions 未上传 - Firebase [关闭]
【发布时间】:2020-09-17 00:58:08
【问题描述】:

我正在尝试为我的 Firebase 项目部署云函数。它表示部署成功,但它从未上传也不会出现在我的 Functions 仪表板中。 这是firebase deploy --only functions 命令的日志:

=== Deploying to 'XXXXXXXXX'...

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint C:\Users\XXXXXX\CloudFunctions\functions
> eslint .

+  functions: Finished running predeploy script.
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...

+  Deploy complete!

Project Console: https://console.firebase.google.com/project/XXXXXX/overview 

我已经尝试了好几次,但似乎都没有成功。有人可以帮我解决这个问题吗?我已经尝试了几天...

【问题讨论】:

  • 嗯,我可能错了,但我认为,Cloud Functions 已移至 GCP。我不确定。

标签: firebase google-cloud-firestore google-cloud-functions firebase-cli


【解决方案1】:

此处的 CLI 输出并未显示您实际部署了任何功能。或者,换句话说,输出显示您部署了 0 个函数。我希望在输出中看到各个部署功能的名称。如果您在此处看不到函数的名称,则意味着您实际上并未从 index.js 中导出它们。如果没有看到您的代码,我们就无法知道您是否正确地完成了该操作。您需要检查您的代码,并确保您已使用 Firebase SDK 正确导出了至少一个函数来定义它。

【讨论】:

  • 我从 GCP 部署了一个函数,当我再次尝试时,它工作了哈哈哈
猜你喜欢
  • 2021-06-18
  • 2019-04-08
  • 1970-01-01
  • 2018-10-16
  • 2021-05-04
  • 2019-03-23
  • 2021-10-03
  • 2020-06-10
  • 2018-06-11
相关资源
最近更新 更多