10

我在使用firebase deploy --only functionsBlaze 计划的应用程序时遇到问题。我有最新的 firebase-tools CLI (v 3.5.0)。

我收到以下错误:

=== 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.

在过去的 12 个小时里,我每半小时重试一次,以为发生了中断。firebase 状态页面显示全部为绿色。

4

1 回答 1

7

好的,这就是我发现的,有点奇怪:

firebase list显示您有权访问的所有 firebase 项目,但它们尚不可用(即作为别名添加到您当前的文件夹项目中)。

即使 firebase-tools CLI 允许您这样做firebase deploy --project myproject1,如果您没有 myproject1在 => 中声明,.firebaserc它也会因上述奇怪的区域错误而失败。

为了解决这个问题,我发现有两个选项:

  • firebase use --add(将触发一个交互式列表)
  • firebase use myproject1

=> 然后firebase deploy --project myproject1将工作(有或没有可选的--only functions

于 2017-03-31T15:07:48.117 回答