01 Okt

Node.JS | 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
->       v6.7.0

Installieren der aktuellen Version

$ nvm install 6.7.0
$ npm --version
3.10.3
node --version
v6.7.0

Auf neuste Version aktualisieren

$ npm -g update npm
nbsp;npm --version
3.10.8