Skip to content

node.js

node.js is a Javascript engine. It includes npm as a package manager. It can be used a server-side engine, or used only at build time,

On Ubuntu, as root, install the nodejs and npm package via apt-get

Terminal window
# apt-get install nodejs npm

Alternatively download and unpack in /opt. After this, users should add it to their PATH.

Download the Windows Installer and install everything.

Individual users can install packages into their home directories. e.g. to install bower module, run

Terminal window
$ npm install bower

To find out where the binary is installed run

Terminal window
$ npm bin

Add this directory to your PATH

To work around this, clear the cache and try again

Terminal window
$ npm cache clear

bower is a package manager you can use with a web project.

Run bower init in your project directory. A bower.json file will be created that describes the project and dependencies. Next you can add dependencies such as Polymer

Terminal window
$ bower install --save Polymer/polymer

When you run this, dependencies are downloaded to the directory bower_components. Then bower.json will be updated with the new dependency.

The bower_components directory should be marked as ignored in version control and should not be checked in.

grunt is a build tool.