After installing node.js and npm and you go to run a node application you get this error:
sh: 1: node: not found npm ERR! error installing firstname.lastname@example.org npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read npm WARN /usr/share/doc/nodejs/README.Debian npm WARN
This is because in debian nodejs installs to /usr/bin/nodejs while the script/program is looking for /usr/bin/node.
To fix just run:
sudo ln -s /usr/bin/nodejs /usr/bin/node