npm i -g firebase-tools
command not found: firebase
がでたらパスをつなぐために、export PATH=$PATH:npm bin -g
を入力する。
firebase login
firebase init
何がしたいのか聞かれるので、やりたいことを選ぶ。今回はHosting
を選択。
「矢印キー」で移動して、「スペース」で選択し、「enter」で決定。
Please select an option?
今回は、Use an existing project
(すでにあるプロジェクト)
ディレクトリが合っていることを確認してenter
What do you want to use as your public directory?
これは、public
ではなくbuild
にする。
Configure as a single-page app?
こちらは、N
を選択する。
npm run build
firebase deploy