多站点 Firebase 部署托管错误 500

Multisite Firebase deploy Hosting Error 500

我尝试部署一个带有 firebase 托管的小网页进行一些测试。

我不希望它托管在 firebase 项目的“主”url 上。因为已经被主站占用了

所以我创建了另一个这样的网站:

sorry, its in french, but you get the idea, and how can I add a picture without you having to click on the link ?

然后我就把firebase加到项目里写了这个firebase.json :

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

然后部署我在控制台上键入:

firebase target:apply hosting thumbnail thumbnail-spotify.web.app
firebase deploy --only hosting

但我得到:

=== Deploying to 'pocspotifyautomate'...

i  deploying hosting

Error: HTTP Error: 500, Internal error encountered.

其他 Whosebug 和论坛讨论了 Firebase 平台方面的错误,但那是几年前的事了,也许这里不是这种情况,因为我可以毫无问题地部署主网站。 秒 有人有想法吗?

好吧,在 firebase.json 文件中,如果符合目标,您有这个 "target": "thumbnail"。在 .firebaserc 文件中你应该有这样的东西:

{
  "targets": {
    "your-project-name": {
      "hosting": {
        "thumbnail": [ // here is your target you have to have seted up in firebase.json
          "thumbnail-spotify" // here is hosting URL prefix you have in firebase console
        ]
      }
    }
  },
  "projects": {
    "default": "your-project-name"
  }
}