如何解决Firebase部署功能错误:云功能部署需要按需付费(Blaze)计费计划

时间:2020-07-11 08:08:58

标签: firebase google-cloud-functions firebase-cli

(基本)macbooks-mbp:功能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

运行命令: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:

1 个答案:

答案 0 :(得分:2)

如果您仔细阅读错误消息,它会告诉您您需要做什么:

云功能部署需要按需付费(Blaze)计费计划。要升级您的项目,请访问以下URL: https://console.firebase.google.com/project/fir-project1-e0b25/usage/details

Cloud Functions不再允许您部署针对Node.js 10运行时的功能,而无需在项目上激活计费帐户。

另请参阅:Is Function Cloud in Firebase Free or Not (Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan)