You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular/Firebase部署简易项目时触发Blaze套餐要求错误

解决方案

问题根源在你firebase.json里的frameworksBackend配置项——这个配置是为了托管需要后端渲染的框架应用(比如Angular Universal),它会自动关联Cloud Functions来处理后端逻辑,这就是为什么部署时会触发artifactregistry.googleapis.com API的需求,同时自动重建.firebase/functions文件夹,而Cloud Functions必须依赖Blaze套餐才能使用。

解决步骤:

  • 编辑你的firebase.json,删除hosting节点下的frameworksBackend配置块,修改后的配置如下:
{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  },
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  }
}
  • 删除项目根目录下的.firebase/functions文件夹,如果存在独立的functions文件夹也一并删除。
  • 重新执行firebase deploy --only hosting或ng deploy,此时部署只会处理静态托管内容,不会触发Cloud Functions相关的依赖检查,也就不需要升级Blaze套餐了。

内容的提问来源于stack exchange,提问作者Marien

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 06:22:13