0
0

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 3 years have passed since last update.

React入門 環境構築(for mac)(nodebrew)

Last updated at Posted at 2021-03-15

まず、Homebrewをインストールします。
Homebrew公式サイト[https://brew.sh/index_ja]

公式から引用
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew -v
# バージョンが出ればインストールできています。

Homebrewを使って、nodebrewをインストール

$ brew install nodebrew
$ nodebrew -v
# バージョンが出ればインストールできています。
$ nodebrew install-binary stable 

stableは安定バージョンです。
latestは最新バージョンです。
今回は安定バージョンを使用しています。

$ nodebrew ls
v14.16.0

current: v14.16.0

current: は使用しているバージョンです

$ nodebrew use (バージョン)

nodebrew ls実行し、反映されていたら大丈夫です。

$ vi ~/.bash_profileでしたの行を追加

export PATH=$HOME/.nodebrew/current/bin:$PATH

$ node -v$ npm -vでバージョンが出たら完了です。

$ npx create-react-app ファイル名
$ cd ファイル名
$ yarn start #起動コマンド

これで開発環境完成です。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?