Node.js


Installing Node.js All Versions

v0.1
v0.2
v0.3
v0.4
v0.5
v0.6
v0.7
v0.8
v0.9
v0.10
v0.11
io.js v1.0
io.js v1.1
io.js v1.2
io.js v1.3
io.js v1.4
io.js v1.5
io.js v1.6
io.js v1.7
io.js v1.8
io.js v2.0
io.js v2.1
io.js v2.2
io.js v2.3
io.js v2.4
io.js v2.5
io.js v3.0
io.js v3.1
io.js v3.2
io.js v3.3
v4.0
v4.1
v4.2
v5.0
v5.1
v5.2
v5.3
v5.4
v5.5
v0.12
v4.3
v5.6
v5.7
v4.4
v5.8
v5.9
v5.10

This draft deletes the entire topic.

inline side-by-side expand all collapse all

Examples

I am downvoting this example because it is...

Syntax

Syntax

Parameters

Parameters

Remarks

Remarks

Still have question about Installing Node.js? Ask Question

Installing with Node Version Manager (nvm)

6

Node Version Manager (nvm) simplifies the management of multiple Node.js versions.

Install the nvm using the install script:

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

Then install the latest Node.js version:

$ nvm install node

You can also install a specific Node.js version, by passing the major, minor, and/or patch versions:

$ nvm install 6
$ nvm install 4.2

You can then switch versions by passing the version the same way you do when installing:

$ nvm use 5

You can set a specific version of Node.js that you installed to be the default version by entering:

$ nvm alias default 4.2

To display a list of Node.js versions that are installed on your machine, enter:

$ nvm ls

When node is installed via nvm we don't have to use sudo to install global packages since they are installed in home folder. Thus npm i -g http-server works.

Installing Node.JS in Windows

1

Node.JS can work as portable version (no need to install), or using an installer. The portable version contain only one files: node.exe that you can download from here:

https://nodejs.org/en/download/ It name: Windows Binary.

The MSI installer also can be download from here:

https://nodejs.org/en/download/

Install Node.js From Source on Ubuntu

0

Prerequisites

sudo apt-get install build-essential
sudo apt-get install python

[optional]
sudo apt-get install git

Get source and build

cd ~
git clone https://github.com/nodejs/node.git

OR For node version 6.3.0

cd ~
wget https://nodejs.org/dist/v6.3.0/node-v6.3.0.tar.gz
tar xzvf node-v6.3.0.tar.gz

Change to the source directory such as in cd ~/node-v6.3.0

./configure
make
sudo make install

Install Node.js on Ubuntu

0

Using the apt package manager.

sudo apt-get update    
sudo apt-get install nodejs
sudo apt-get install npm

Install Node.JS via Version Manager

0

A better way to install node is to use a version manager such as NVM, because it allows you to quickly switch between different versions of Node quickly.

OSX:

  1. You'll need to install the Command Line Tools beforehand.
  2. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash

Windows:

  1. Download the executable of nvm-windows from here

Installing Node.js on Mac using Homebrew

0

You can install Node.js using the Homebrew package manager.

Start by updating brew.

brew update

You may need to change permissions or paths. It's best to run this before proceeding:

brew doctor

Next you can install Node.js by running:

brew install node

Once Node.js is installed, you can validate the version installed by running:

node -v

Installing Node.js on Raspberry PI

0

To install v6.x update the packages

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

Using the apt package manager

sudo apt-get install -y nodejs

Installing using MacOS X Installer

0
  • Download the installer from Node.js official site.
  • Upon completion of download, open the package and follow on-screen instructions
  • Re-initialize your terminals (if they're already open)

You should now be able to use node command from your terminals.

Topic Outline