LoginSignup
1
0

nodebrewインストールメモ

Last updated at Posted at 2022-08-16

nodebrewインストール方法
忘れるのでメモ。

nodebrew インストール

$ brew install nodebrew
$ nodebrew setup
Fetching nodebrew...
Installed nodebrew in $HOME/.nodebrew

========================================
Export a path to nodebrew:

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

# 上記で setup したときに表示されたコマンドを .bash_profile に追記
$ echo "export PATH=\$HOME/.nodebrew/current/bin:\$PATH" >> ~/.bash_profile
$ source ~/.bash_profile

# インストールしたいバージョンを下記から選択
$ nodebrew ls-remote

# node.js インストール
$ nodebrew install v10.15.3

# インストール内容確認
$ nodebrew ls
v10.15.3

current: none

# インストールしたバージョンを使用可能にする
$ nodebrew use v10.15.3

# 使用可能になったか確認(current のところ)
$ nodebrew ls
v10.15.3

current: v10.15.3

# バージョン確認
$ node -v
$ npm -v

# 困ったらヘルプを見る
$ nodebrew help
1
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
1
0