The best method for installing Node.js I’ve found so far is with n-install.
Don’t do the curl pipe bash thing! Download the script, then run it.
That gets you to the point of being able to run a locally scoped version of n, the Node.js version manager, without having to install Node.js first.
By default it keeps everything in ~/n
, which makes it very easy to nuke and start over if it all goes completely off the rails.