LoginSignup
23
20

More than 5 years have passed since last update.

Reactの環境構築を最短で行う

Last updated at Posted at 2017-07-12

:star: 目標

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

スクリーンショット 2017-07-12 20.27.08.png

:star: 手順

:pencil: nodebrewをインストールし、初期設定をします

$ brew install nodebrew
$ nodebrew setup

:pencil: nodebrew用のパスをbash_profileに追加し、読み込みます

$ cd
$ vi ~/.bash_profile

# これを追記してパスを通す
export PATH=$HOME/.nodebrew/current/bin:$PATH

# 読み込むのを忘れずに
$ source ~/.bash_profile

:pencil: Node.jsをインストールします

$ nodebrew install-binary v7.4.0

# インストールされていればバージョンが表示されます
$ nodebrew ls

:pencil: create-react-appコマンドが使えるようにします

$ npm install -g create-react-app

:pencil: 実際にアプリを作ってみましょう

$ create-react-app アプリ名

:pencil: アプリのディレクトリに移動して下記コマンドで実行します

$ npm start

:bulb: 下記の画面が表示されれば成功

スクリーンショット 2017-07-12 20.27.08.png

:star2: 素敵なReactライフを!

:star: 関連

:star: 参考

23
20
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
23
20