0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Firebase HostingでデプロイしたReactアプリが表示されない

Posted at

解決方法

1. npm run buildを実行

npm run build

buildフォルダの生成を確認できたら成功。

2. firebase.jsonを確認する

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

"public":の部分が"public"ではなくbuild"になっていることを確認する。

3. firebase deployを実行する

firebase deploy

リンク先で正常に表示されるか確認する。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?