spences10
2/1/2017 - 1:53 AM

Installing nvm

Installing nvm

nvm

From nvm github

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

Install LTS version

nvm install --lts

or ...

List all versions:

nvm ls-remote

Install specific version

nvm install 7.0.0

List all installedd versions

nvm ls

Switch versions

nvm use 6.9.5

Yarn

npm vs yarn - https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc#.3okvh9zg4

Add debian repository

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list

Install yarn

sudo apt-get update && sudo apt-get install yarn

Test on a helloworld app

git clone https://github.com/IBM-Bluemix/node-helloworld.git yarn yarn add lodash yarn add underscore --dev