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

一世执手 提交于 2019-12-08 15:00:07

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/45760199/when-deploying-with-firebase-hosting-i-get-hosting-rewrites0-is-not-exactly-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!