Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 855
Niek Oost Avatar asked Aug 18 '17 15:08

Niek Oost


People also ask

How does Firebase deploy work?

Using the Firebase CLI, you deploy files from local directories on your computer to our Hosting servers. Beyond serving static content, you can use Cloud Functions for Firebase or Cloud Run to serve dynamic content and host microservices on your sites.

How many sites can I host on Firebase?

Consider using automatic SDK configuration to mirror multiple environments using a single codebase. The multisite feature supports a maximum of 36 sites per Firebase project.

How do I remove Firebase Hosting setup complete?

Go to Firebase Console and select Hosting from the menu of the left. You will see the deployed project with a list of your historical actions like Deployed , disabled , etc. Only after you have disabled the site, the "three vertical dots" menu will be available for you to choose the action to delete the deployment.


1 Answers

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

like image 156
Niek Oost Avatar answered Oct 22 '22 19:10

Niek Oost