Install
Links
Install
Using a repository
Note
Ember requires node version 4.
From https://github.com/nodesource/distributions:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt install nodejs
Update npm
:
sudo npm install -g npm
or:
Note
The following command installs nodejs
which is the same as the
old node
command. If you need to use the node
command, then
install nodejs-legacy
as well.
Note
The version of node installed by Ubuntu 16.10 is not supported by Ember.
From Installing Node.js via package manager:
sudo apt install nodejs npm
Using Node Version Manager
From Node Version Manager and How To Install Node.js on Ubuntu
Prerequisites:
sudo apt-get update
sudo apt-get install build-essential libssl-dev
Install node version manager:
curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | bash
source ~/.profile
Install node:
nvm install 0.10.29
nvm install 4.3.1
To use this version of node in another shell:
nvm use 0.10.29
Sample
Here is the sample code from the node home page: example-web-server.js:
$ node ~/repo/sample/javascript/node/example-web-server.js
Server running at http://127.0.0.1:8000/
…browse to http://127.0.0.1:8000/