Firebase CLI deploy functions - Error: Failed to initialize a region

最后都变了- 提交于 2019-12-22 04:58:28

问题


I'm having trouble doing firebase deploy --only functions for an app on Blaze plan. I have the latest firebase-tools CLI (v 3.5.0).

I get the following error:

=== Deploying to 'myapp1234'...

i  deploying functions
i  functions: ensuring necessary APIs are enabled...
i  runtimeconfig: ensuring necessary APIs are enabled...
✔  runtimeconfig: all necessary APIs are enabled
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (1.29 KB) for uploading
✔  functions: functions folder uploaded successfully
i  starting release process (may take several minutes)...
i  functions: updating function myFunc...
⚠  functions[myFunc]: Deploy Error: Failed to initialize a region


Functions deploy had errors. To continue deploying other features (such as database), run:
    firebase deploy --except functions

Error: Functions did not deploy properly.

I've retried this every half hour for the past 12 hours, thinking there's an outage. The firebase status page shows all green.


回答1:


Ok, here's what I found, a little weird:

firebase list shows all the firebase projects you have access to, BUT they are not already available (i.e. added as alias to your current folder project).

Even if the firebase-tools CLI allows you to do firebase deploy --project myproject1, if you do not have myproject1 declared in .firebaserc => it will fail with the weird region error above.

To fix this, I found that there are 2 options:

  • firebase use --add (will trigger an interactive list)
  • firebase use myproject1

=> and then firebase deploy --project myproject1 will work (with or without the optional --only functions)



来源:https://stackoverflow.com/questions/43091258/firebase-cli-deploy-functions-error-failed-to-initialize-a-region

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