Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan [duplicate]

After i upgraded to node 10, i am facing this error when deploy my functions

 Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan.

Is downgrading node will solve the problem at least temporarily, Is there a way to solve the problem without downgrading??

like image 991
Saher Elgendy Avatar asked Jul 11 '20 16:07

Saher Elgendy


People also ask

Do you have to pay for Firebase functions?

Firebase's paid infrastructure products are the Realtime Database, Cloud Storage for Firebase, Cloud Functions, Hosting, Test Lab, and phone authentication. We offer a no-cost tier for all of these features.

Can we use cloud functions for free?

Cloud Functions includes a perpetual free tier for invocations to allow you to experiment with the platform at no charge. Note that even for free tier usage, we require a valid billing account.

What are cloud functions Firebase?

Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your JavaScript or TypeScript code is stored in Google's cloud and runs in a managed environment.

How do I pause Google cloud?

You cannot disable a function. Just comment the function body. It would be a good practice to log the call in the console and then return null so you can keep track whenever the function is invoked.


1 Answers

Change the following in functions/package.json:

"engines": {
  "node": "8"
}

It should solve the problem (for now), the official doc.

TL;DR:

  • Node.js 10. This runtime requires the Blaze pay-as-you-go billing plan. This plan provides generous amounts of invocations, compute time, and internet traffic free of charge. See Cloud Functions pricing.
  • Node.js 8 (deprecated as of June 8, 2020). Deployment of Node.js 8 functions will no longer be allowed after February 15, 2020. Then, executions of already-deployed Node.js 8 functions will stop after March 15, 2021. If you have deployed functions to the Node.js 8 runtime, you're recommended to upgrade to the Node.js 10 runtime.
like image 182
andresmijares Avatar answered Sep 30 '22 01:09

andresmijares