I added the functions folder for firebase cloud functions. But now I can not deploy my Angular project. When I deploy only the function with firebase deploy --only functions it works fine but when I try to deploy my project by running firebase deploy, I get this error:
Error: desktop/projects/my-angular-project/firestore.indexes.json does not exist
my firebase.json file :
{
  "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"
    ]
  }
}
How do I fix this?
Your firebase.json files has an instruction to deploy security rules and predefined indexes to Firestore here:
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
If you don't want either of these to happen, remove that line from the firebase.json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With