node.js on Debian

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 chokidar@0.4.0
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