Following instructions work
Below are the steps to install Node.js from source (OSX/linux)
You may/should issue all these cmds as yourself NOT root (sudo)
NOTE - this installs Node.js which gives you both node as well as npm,
they come together per release.
to start fresh remove prior node and npm installs as well as these :
sudo mv ~/.npmrc ~/.npmrc_ignore
sudo mv ~/.npm ~/.npm_ignore
sudo mv ~/tmp ~/tmp_ignore
sudo mv ~/.npm-init.js ~/.npm-init.js_ignore
download source from : http://nodejs.org/download/
cd node-v0.10.33
define environment variable NODE_PATH as the dir for subsequent module installs
export NODE_PARENT=/some/desired/install/path_goes_here
export NODE_PARENT=/usr/local/bin/nodejs # use this if you want to install as root (sudo)
export NODE_PARENT=${HOME}/nodejs-v0.10.33 # use this if you want to install modules as yourself
export PATH=${NODE_PARENT}/bin:${PATH}
export NODE_PATH=${NODE_PARENT}/lib/node_modules
./configure --prefix=${NODE_PARENT}
make
make install
which puts it into dir defined by above --prefix
when you use syntax : npm install -g some_cool_module
the -g for global installs it into dir $NODE_PATH and not your $PWD
Now put above three export xxx=yyy
commands into your ~/.bashrc or some such to persist these environment variable changes