I want to use sudo-free node with Hexo and blockchain related scripts. Do not use the apt-get method of installation on Debian as that provides a “nodejs” executable rather than “node” which can be problematic (at least with Hexo). I will follow the installation instructions at nearform. There is also a good tutorial at sitepoint.
Determine if node is installed:
1 | $which node |
and remove if it is:
1 | sudo rm -f /usr/local/share/man/man1/node.1 |
Install using NVM
1 | #apt-get install curl ;;if needed |
;;to see where executable reside
1 | npm config get prefix |
use ~/.npm for local (global) installation
always install with the -g option (global, but with my setup it will be under my home dir, no sudo needed)
the -save option adds the package to the application specific package list, so it will automatically be installed when the package is moved.