NodeJS setup

Nvm + Npm

Jacob Xie published on
1 min, 61 words

Categories: Post

Tags: Js

Nvm

git clone git@github.com/creationix/nvm.git .nvm
cd .nvm
git checkout v0.39.4

Optional, saving nvm into .bashrc:

...
source ~/.nvm/nvm.sh
...
source ~/.bashrc

Check NodeJS version:

nvm ls

Install the latest stable version:

nvm install stable

Npm

Check Npm version

npm -v

Update, and install yarn

npm install -g npm
npm install -g yarn