Using npm in a stage1.io build
When using a .stage1.yml configuration file, your base image will always be an ubuntu. Using npm is just a matter of installing it with, for example, the following lines:
apt-get install -y software-properties-common python-software-properties python g++ make
apt-add-repository ppa:chris-lea/node.js
apt-get update -y
apt-get install -y nodejs
npm install -g bower
If you use a Dockerfile, it depends on your base image, but the idea is the same :)
note: these examples are full-fledged examples used in production at stage1.io, they do show much more than just npm usage