Getting started

Install required packages

$ sudo apt-get update
$ sudo apt-get install build-essential libssl-dev
$ sudo apt-get install curl

Install nvm

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

Activate nvm

Loggoff and login again or

$ export NVM_DIR="/home/vagrant/.nvm"
$ . "$NVM_DIR/nvm.sh"

Check Installation

$ nvm list

Anzeigen der installierbaren Versionen

$nvm ls-remote | tail -1

Installieren der aktuellen Version

$ nvm install 11.5.0
$ npm --version
6.5.0
$ node --version
v11.5.0

Auf neuste Version aktualisieren

$ npm -g update npm
$ npm --version
6.5.0

Use local cache for NPM 

Install local cache manager

npm install npm_lazy

Create directory for cache manager

NPM_LAZY_HOME=/tmp/cache
mkdir $NPM_LAZY_HOME