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.
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.
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.
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.
Apparently, the error indicates that I should put a '/' in front of 'index.html'. Then it works for local and remote deploy.
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