Firebase如何免费部署云功能 [英] Firebase how to deploy cloud functions for free

查看:44
本文介绍了Firebase如何免费部署云功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我追踪了一些逐步部署Firebase云功能的教程,但我没有发现该教程中有任何涉及付费或类似的内容,甚至是官方的Firebase文档,但是当我运行firebase部署此命令时,我会收到此错误

  firebase部署===部署到"wissal-4736a" ...我部署功能运行命令:npm --prefix"$ RESOURCE_DIR";运行皮棉>功能@lint C:\ Users \ HP \ Desktop \ aaaa \ functions>埃斯林特.+功能:完成运行预部署脚本.我的职能:确保启用了必需的API cloudfunctions.googleapis.com ...我的功能:确保启用了必需的API cloudbuild.googleapis.com ...!函数:缺少必需的API cloudbuild.googleapis.com.正在启用...+函数:必需的API cloudfunctions.googleapis.com已启用错误:云功能部署需要按需付费(Blaze)计费计划.要升级您的项目,请访问以下URL:https://console.firebase.google.com/project/wissal-4736a/usage/details有关此要求的其他信息,请参阅Firebase常见问题解答:https://firebase.google.com/support/faq#functions-runtime 

所以我应该将我的帐户升级为付费帐户,还是出现一些错误,或者是因为我是学生而获得免费帐户的解决方案我需要一些帮助,谢谢

解决方案

如错误消息所述,将Cloud Functions部署到Firebase项目需要该项目处于现收现付计划中.这不一定意味着您必须为此付费,因为该计划带有免费套餐.从Firebase 定价页面:

在Blaze计划中,Cloud Functions提供了永久的免费套餐.每月免费提供前2,000,000次调用,400,000 GB-秒,200,000 CPU-秒和5 GB的Internet出口流量.您只需为超出此免费分配量的使用量付费.

另一种选择是切换到使用Node.js 8运行时,该运行时尚未要求帐户在计费计划中.

有关此功能以及在Firebase中如何使用Cloud Functions计费的更多信息,请参见 Cloud Functions运行时支持 Cloud Functions定价.

i follwed some tutorials to deploy firebase cloud functions step by step and i did not found any of this tutorial spoke about paying or something like this even the official firebase documentation but when i run firebase deploy this command i get this error

 firebase deploy 

=== Deploying to 'wissal-4736a'...

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

> functions@ lint C:\Users\HP\Desktop\aaaa\functions
> eslint .

+  functions: Finished running predeploy script.
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/wissal-4736a/usage/details

For additional information about this requirement, see Firebase FAQs:

https://firebase.google.com/support/faq#functions-runtime

so should i upgrade my account to a apayed account or i made some errors or ther is a solution to get a free account because i'm a student i need some helps and thank you

解决方案

As the error message says, deploying Cloud Functions to your Firebase project requires that the project is on the pay-as-you-go plan. This doesn't necessarily mean you have to pay for it though, as the plan comes with a free tier. From the Firebase pricing page:

On the Blaze plan, Cloud Functions provides a perpetual free tier. The first 2,000,000 invocations, 400,000 GB-sec, 200,000 CPU-sec, and 5 GB of Internet egress traffic is provided for free each month. You are only charged on usage past this free allotment.

An alternative is to switch to using the Node.js 8 runtime, which doesn't yet require the account to be on a billing plan.

For more on this and how billing around Cloud Functions works in Firebase, see the FAQs on Cloud Functions runtime support and Cloud Functions pricing.

这篇关于Firebase如何免费部署云功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆