How to install node.js on Raspberry?

If you must do it manually rather than using the node-red install script then use the nodesource repository. For a pi follow the instructions for Debian based systems.