LoginSignup
0
0

More than 3 years have passed since last update.

Node.jsのインストール

Posted at

インストール方法

変なところでつまづいたので、記録のために記載します。

ディレクトリの作成

$ mkdir -p ~/.nodebrew/src

Nodebrewのインストール

$ brew install nodebrew

Node.jsのインストール

nodebrew ls-remoteでダウンロードできるバージョンを確認できます。
今回はstable = 安定版を選択
バージョンを指定する場合は {version}

$ nodebrew install-binary stable

Node.jsの有効化 ※忘れがち

インストールしただけでは有効化していません。

$ nodebrew use vインストールしたバージョンのいずれかを指定

環境パス

nodeが使えるように環境パスを通します。

$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile

無事使用できるかの確認

実行後、バージョンが表示されればOK

$ node -v
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