Search code examples
firebasegoogle-cloud-functionsfirebase-cli

how to resolve firebase deploy function error: Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan


(base) macbooks-mbp:functions macbook$ firebase deploy

=== Deploying to 'fir-project1-e0b25'...

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

> functions@ lint /Users/macbook/fireCast/functions
> tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

> functions@ build /Users/macbook/fireCast/functions
> tsc

✔  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/fir-project1-e0b25/usage/details

For additional information about this requirement, see Firebase FAQs:

Solution

  • If you read the error message carefully, it tells you what you need to do:

    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/fir-project1-e0b25/usage/details

    Cloud Functions no longer allows you to deploy functions targeting the nodejs 10 runtime without a billing account active on the project.

    See also: Is Function Cloud in Firebase Free or Not (Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan)