Skip to content

24 ways to impress your friends

Vote up?

Jonathan Beech

I was initially getting frustrated with having to add sudo along with the appropriate password whenever I attempted to do an npm install which goes hand in hand with Grunt. However I found a good article on StackOverflow which helped me out a great deal. I’m not a confident command line user yet however I was able to change the permissions using the following commands:

sudo chown -R `whoami` ~/.npm

This basically changes recursively the ownership of the folder so that non root administrators dont need permission to access it.

You may also need this

sudo chown -R `whoami` /usr/local/lib/node_modules

It stopped the pesky sudo need from getting in the way for me at least.