0

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
[email protected] /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
[email protected] /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
....

1 Answer 1

1

I would suggest to start using https://github.com/creationix/nvm, the main problem is that Node installation doesn't belong to your user and trying to install global packages will require sudo, using nvm Node installation will belong to your user and you will get rid of all those permission problems.. as a plus you will be able to handle multiple versions of Node/io.js and keep it update will be really easy

Sign up to request clarification or add additional context in comments.

3 Comments

so sould i use this package before installing nodejs, yeoman and bower?
You just use node with nvm, this will replace your current Node installation, here is a nice tutorial from Digital Ocean: digitalocean.com/community/tutorials/…
I cannot try this right now but I will soon. it might works for me :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.