はじめに
reactアプリのfirebaseデプロイで少し苦戦したので記事にしておきます。
問題
firebase deployコマンドを叩くとなぜかWelcomeされる。

解決策
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からライン登録お願いします👇