LoginSignup
3
3

More than 5 years have passed since last update.

nvmを利用したnode.jsのインストール方法

Posted at

nvmを使用して複数バージョンのnodeを切り替えて使用する方法

nvmのインストール

bash
git clone https://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh

node.jsのインストール

bash
# 指定したバージョンのnode.jsをインストールして有効化する
nvm install v0.10.24
bash
# 0.x系の最新のnode.jsをinstallして有効化する
nvm install 0

nvmのその他のコマンド

bash
# install可能なnodeのバージョンを表示する
nvm ls-remote
bash
# install済のnode.jsのバージョンを表示
nvm ls
bash
# 0.x系に切り替えて有効化する
nvm use 0

その他

  • 起動時にnvmとnode.jsを有効化する
.bash
# .bashrc等の設定ファイルに以下を記述しておく
source ~/.nvm/nvm.sh
nvm use 0
3
3
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
3
3