moh*_*li 53 firebase google-cloud-functions firebase-cli
当我创建我的第一个部署函数时我无法部署因为我有错误要求我升级到我的帐户到 Blaze 我需要知道我可以在使用免费帐户时部署函数吗??
输出:
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
! functions: missing required API cloudbuild.googleapis.com. Enabling now...
+ functions: required API cloudfunctions.googleapis.com is enabled
Error: Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan. To upgrade your project, visit the following URL:
https://console.firebase.google.com/project/institute-for-admin/usage/details
For additional information about this requirement, see Firebase FAQs:
https://firebase.google.com/support/faq#functions-runtime
Run Code Online (Sandbox Code Playgroud)
Dou*_*son 36
正如消息所说,如果您的目标是 nodejs 10,则无法在 Spark 免费层上部署函数。 阅读常见问题解答的链接:
为什么我需要一个结算帐户才能将 Node.js 10 运行时用于 Cloud Functions for Firebase?
由于计划于 2020 年 8 月 17 日更新其底层架构,Cloud Functions for Firebase 将依赖于一些额外的 Google 付费服务:Cloud Build、Container Registry和Cloud Storage。这些架构更新将适用于部署到 Node.js 10 运行时的函数。除现有定价外,还将对这些服务的使用进行计费。
在新架构中,Cloud Build 支持功能的部署。您只需为构建函数的运行时容器所需的计算时间付费。
Cloud Storage 与Google Container Registry互操作,将为运行函数的容器提供存储空间。您需要为部署功能所需的每个容器付费。如果您目前在免费使用限制内使用 Cloud Functions,您可能会注意到存储的每个容器都有新的小额费用 - 例如,1GB 存储的费用为每月 0.026 美元。
要详细了解您的账单可能会如何变化,请查看以下内容
- Cloud Functions 定价:现有免费套餐不变。
- Cloud Build 定价:Cloud Build 提供免费层。
- Container Registry 定价。
如果您想以节点 8 为目标,那可能仍然有效。但它已被弃用,您的功能最终将停止工作。在这种情况下,您仍然需要将它们迁移到节点 10,并提供计费帐户。
Cloud Functions 仍有每月免费配额,详情见定价页面。但是您必须提供信用卡并制定账单计划才能使用它。您将负责支付任何每月超额费用。
San*_*ath 20
目前,firebase 使用节点版本 10 来实现需要您付费的云功能(即付即用)。
您可以在 functions/package.json 中将节点从 10 更改为 8(免费使用)
"engines": {
"node": "8". // changed from 10 to 8
},
Run Code Online (Sandbox Code Playgroud)
但是,这将很快被弃用。这是 firebase 网站所说的:
Node.js 8 已被弃用。从 2021 年 2 月 15 日开始,我们将不再支持 Node.js 8 功能的新部署或更新。从 2021 年 3 月 15 日开始,我们将不再支持现有 Node.js 8 函数的执行。
https://firebase.google.com/support/faq?authuser=0#expandable-10-label
编辑
这可能是一个遗产。请查看最新评论以获取更新的政策。
| 归档时间: |
|
| 查看次数: |
31555 次 |
| 最近记录: |