LoginSignup
0
0

Firebase Hosting Setup Complete が表示されてしまうときの対処法

Last updated at Posted at 2023-09-24

問題

ローカル環境およびホスト環境でFirebase Hosting Setup Complete が表示されてしまう

環境

Nuxt 3.7.3 (SPA)

firebase 10.4.0

対策

1. Nuxt3の出力先は .output/public であるため、出力先ディレクトリを変更

firebase.json
{
  "hosting": {
    "public": ".output/public",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
}

私の環境ではこれで https://~.web.app のドメインで想定通りのアプリが表示されました。
しかし、 https://~.firebaseapp.com のドメインはFirebase Hosting Setup Completeのまま。謎。

また、開発サーバでもFirebase Hosting Setup Complete でした。

2. ~/public 配下の index.html を削除

firebase init 時に public配下に index.html を生成してしまっていました。

削除することで解決!

最後に

firebase init 時に英語でたくさんの質問が行われますが、きちんと読まないといけないですね。反省。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0