13

Deploying an application to Firebase hosting, I get the following error:

HTTP Error: 400, hosting.rewrites[0] is not exactly one from [subschema 0],[subschema 1]

This occurs with a simple configuration like:

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "/*/*",
        "destination": "index.html"
      }
    ]
  }
}

This configuration does work when serving locally.

skr
  • 2,146
  • 19
  • 22
Niek Oost
  • 628
  • 5
  • 15

1 Answers1

17

Apparently, the error indicates that I should put a '/' in front of 'index.html'. Then it works for local and remote deploy.

Niek Oost
  • 628
  • 5
  • 15
  • didn't help me. I was using a function called ssr instead of a static index.html.file for deploying with Angular Universal, eg `"destination": "ssr"`. Any idea what the error actually means? – Phil Jan 31 '18 at 06:20
  • 1
    concerning my problem: it should be: `"function": "ssr"` – Phil Jan 31 '18 at 06:49