Compiling node.js can take several hours on these small boards. You can copy/paste the following codes one by one and have a functional nodejs setup when finished.
Make sure you can access the board over ssh ...
Once you have access with ssh you should be able to paste the following code's in the terminal one by one and end with a functional NodeJS installation. (on linux copy with: Ctrl-c and paste in the terminal with Ctrl-Shift-v or Ctrl-Shift-insert)
sudo apt-get install python g++ make
mkdir ~/nodejs && cd $_
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd `ls -rd node-v*`
sudo make install
...confirm that Node is installed properly by checking the version: