본문 바로가기
Web/Etc

[Node] NVM (Node Version Manager)

by llHoYall 2020. 8. 30.
※ 08.30.2020 - v1.1.7

nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell.

Installation

On Mac

$ brew install nvm

Next, create a folder for nvm.

$ mkdir ~/.nvm

After installs it, add the below code in your shell profile.

export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm"

On Windows

If you use Chocolatey, you can easily install it.

$ choco install -y nvm

Usage

Show current nvm version

$ nvm version

Show currently activated version

$ nvm current

Show installed node version

$ nvm ls

Show available versions on remote

$ nvm ls-remote

Show available versions

$ nvm ls available

Install latest or LTS node version

$ nvm install latest
$ nvm install --lts

Install node specified version

$ nvm install <version>

Use node specified version

$ nvm use <version>

'Web > Etc' 카테고리의 다른 글

[Babel] Getting Started  (0) 2020.09.10
[Pug] Getting Started  (0) 2020.09.09
[Node] yarn  (0) 2020.08.30
[Node] NPM (Node Package Manager)  (0) 2020.08.30
[Node] Node.js  (0) 2020.08.30

댓글