# 目標
-
create-react-app
のコマンド一つでReactのアプリが生成できるようにする



$ brew install nodebrew
$ nodebrew setup
nodebrew用のパスを
bash_profile
に追加し、読み込みます
$ cd
$ vi ~/.bash_profile
# これを追記してパスを通す
export PATH=$HOME/.nodebrew/current/bin:$PATH
# 読み込むのを忘れずに
$ source ~/.bash_profile
Node.jsをインストールします
$ nodebrew install-binary v7.4.0
# インストールされていればバージョンが表示されます
$ nodebrew ls
create-react-app
コマンドが使えるようにします
$ npm install -g create-react-app
実際にアプリを作ってみましょう
$ create-react-app アプリ名
アプリのディレクトリに移動して下記コマンドで実行します
$ npm start
下記の画面が表示されれば成功



# 参考