2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Firebaseでdeployした時にError: HTTP Error: 400, Billing account for projectの解決方法

Posted at

Reactで作ったアプリをFirebaseでdeployしようとしたら、、、

✔  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: HTTP Error: 400, Billing account for project 'プロジェクト番号' is not found. Billing must be enabled for activation of service(s) 'cloudbuild.googleapis.com,containerregistry.googleapis.com' to proceed.

このようなdeployエラーに遭遇しました。今回はこのエラーの原因と解決方法を備忘録として残します。

解決方法

functionsにあるpackage.jsonファイルのnodeを10から8に変えます。

"engines": {
    "node": "10"
  },

こちらを以下のように変更する。

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

原因

node 10を使用するには、クラウド機能の課金アカウントが必要です。おそらく、グーグルが無料のサービスを提供するのではなく、請求可能なアカウントに人々を移動させるためにこのような仕様にしているのだと思います。そのため、解決するにはpackage.jsonのnode 8に変更する必要があります。
何か間違いやご指摘があれば、よろしくお願い致します。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?