firebase 部署:错误:文件路径/firestore.indexes.json 不存在

Pey*_*iri 1 firebase

我为 firebase 云函数添加了函数文件夹。但是现在我无法部署我的Angular项目。当我仅部署带有firebase deploy --only functions它的功能时,它工作正常,但是当我尝试通过运行部署我的项目时firebase deploy,出现此错误:


Error: desktop/projects/my-angular-project/firestore.indexes.json does not exist
Run Code Online (Sandbox Code Playgroud)

我的firebase.json文件:

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**",
      "**/functions/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint",
      "npm --prefix \"$RESOURCE_DIR\" run build"
    ]
  }
}

Run Code Online (Sandbox Code Playgroud)

我该如何解决?

Fra*_*len 7

您的firebase.json文件在此处提供了将安全规则和预定义索引部署到 Firestore 的说明:

  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
Run Code Online (Sandbox Code Playgroud)

如果您不希望其中任何一个发生,请从firebase.json.