When deploying with Firebase hosting, I get hosting.rewrites[0] is not exactly one from [subschema 0],[subschema 1]
Asked Answered
W

2

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.

Woodenware answered 18/8, 2017 at 15:28 Comment(0)
W
17

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

Woodenware answered 19/8, 2017 at 15:39 Comment(2)
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?Demetricedemetris
concerning my problem: it should be: "function": "ssr"Demetricedemetris
K
0

hosting[cuponera]: Unable to find a valid endpoint for function ssr, but still including it in the config

Keg answered 28/8, 2024 at 0:17 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.