Install Node.js with Ubuntu Package Manager

To install Node.js and Node Package Manager (NPM), open a terminal and type the following commands

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

Then create a symbolic link so node will map to nodejs:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Then test it:

node --version
npm --version

These should output a valid version like v0.10.25 or 1.3.10.

Install local copy of NW.js into your app

Run the following to download NW.js to the node_modules folder in your project folder:

npm install

You’ll only ever need to run this once.

Run your project!

Now that you’ve got Node installed and NW.js downloaded from now on you’ll be able to just run the following command to start the app:

npm start