Node.js

From Han Wiki
Revision as of 15:21, 29 April 2016 by Mhan (talk | contribs) (iwu)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jump to navigation Jump to search

Administrative

Upgrade Node.js to the latest version via NPM

  • Last tested on Ubuntu 16.04 LTS (xenial) | easy | less than five minutes
# check the current version number
$ node -v

# clean cache forcefully
$ sudo npm cache clean -f

# install n Module
$ sudo npm install -g n

# install Nodejs
$ sudo n stable

# setup binary link -- use the version number for the folder path
$ sudo ln -sf /usr/local/n/versions/node/6.0.0/bin/node /usr/bin/node

# check updated Nodejs version
$ node -v