Firebase how to deploy cloud functions for free

这一生的挚爱 提交于 2021-02-08 10:44:22

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/63245450/firebase-how-to-deploy-cloud-functions-for-free

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!