It took a little digging, I started with these instructions. However you must use npm with sudo and any scripts you download have full access to ravage your system.Running node js on Ubuntu 10 04
The process is simple. If you followed these instructions previously, you need to uninstall it or NPM will continue to install in /usr/local/bin. If you are starting fresh move onto step 2.
Step 1. Remove old npm/node
Step 2. Install node locally
The following taken from gist
#IIRC, this only works for shell windows opened
echo ‘export PATH=$HOME/local/bin:$PATH’ >> ~/.bashrc
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz –strip-components=1
make install # ok, fine, this step probably takes more than 30 seconds…
curl http://npmjs.org/install.sh | sh
Now you can install useful middleware like express without sudo.
npm install express