How to compile a node.js module myself

Can someone give me a brief overview of what is involved in compiling a node.js module myself? I need to use mongodb@1.1.3. Unfortunately, npm install mongodb@1.1.3 fails because it has a dependency on bson@0.1.1. bson@0.1.1 uses node install, I am on Xubuntu (Debian), which has changed node to nodejs because of a namespace collision.

Can I just git clone the module into a directory off of ~/workspace/projectname/node_modules? Then modify the offending reference, and voila?

As a quick fix, you can add a link from /usr/bin/nodejs to $HOME/bin/node and make sure that $HOME/bin is first in your path (it should be):

mkdir -p $HOME/bin
ln -s /usr/bin/nodejs $HOME/bin/node
hash -r
echo $PATH

Afterwards, node install should work.