2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

firebaseにデプロイするとFirebase Hosting Setup Completeと出る

2
Posted at

はじめに

reactアプリのfirebaseデプロイで少し苦戦したので記事にしておきます。

問題

firebase deployコマンドを叩くとなぜかWelcomeされる。
スクリーンショット 2024-07-22 9.23.23.png

解決策

firebase init hostingコマンド叩いた際に聞かれる質問を以下のように答えて

$firebase init hosting
  ? What do you want to use as your public directory? dist
  ? Configure as a single-page app (rewrite all urls to /index.html)? Yes
  ? Set up automatic builds and deploys with GitHub? No
  ? File dist/index.html already exists. Overwrite? No

buildとdeployしなおしたら、無事Hosting URLからアプリの画面を確認できました。

$npm run build
$firebase deploy

ただ他の方の記事を見ていると人それぞれ原因が違ったり、質問も少し違う場合があったので人によって解決策も変わってくるかと思います。

おわりに

次はcicdにもチャレンジしていきます。

参考記事

JISOUのメンバー募集中

プログラミングコーチングJISOUではメンバーを募集しています。
日本一のアウトプットコミュニティでキャリアアップしませんか?

気になる方はぜひHPからライン登録お願いします👇

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?