I'm using ubuntu12 on vmware without admin account. everytime I install some package such as yeoman, grunt, bower, I need to after-work or before-work for permision issue.
here is my favorite way to fix them link.
everything seems to work well BUT I tried to update nodejs though npm
> sudo npm cache clean -f //work
> sudo npm install -g n //looks install is completed
/home/kim/npm/bin/n -> /home/kim/npm/lib/node_modules/n/bin/n
n@2.0.1 /home/kim/npm/lib/node_modules/n
> sudo n stable
sudo : n: command not found
//I tried this too
> n
mkdir : cannot create directory `/usr/local/n' : Permission denied
looks same problem with what i went through BUT not works with my way. I want to fix these problems basically.
similar problem is here
> yo doctor
...
Your npm version is outdated
Upgrade to the latest version by running:
npm install -g npm
....
//i try to install npm as yo-doctor mentioned and looks done well
> npm install -g npm
/home/kim/npm/bin/npm -> /home/kim/npm/lib/node_modules/npm/bin/npm-cli.js
npm@2.13.4 /home/kim/npm/lib/node_modules/npm
//but when i re-check yo-doctor, same issues pop up again. WHY?
> yo doctor
...
Your npm version is outdated
Upgrade to the latest version by running:
npm install -g npm
....