Currently I always run sudo npm install <package-name>
but as I understand it's not correct.
I want to have opportunity not to use it as root/Administrator.
I followed some advice and used this command sudo chown -R <username> ~/.npm
but it won't work...
for example, it's an output of my npm install jade
...
npm http 200 https://registry.npmjs.org/amdefine
npm http GET https://registry.npmjs.org/amdefine/-/amdefine-0.0.5.tgz
npm http 200 https://registry.npmjs.org/amdefine/-/amdefine-0.0.5.tgz
npm ERR! Error: EACCES, symlink '../jade/bin/jade'
npm ERR! { [Error: EACCES, symlink '../jade/bin/jade'] errno: 3, code: 'EACCES', path: '../jade/bin/jade' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
as you see download started successfully but then failed..
I'm wondering what is the best way to disallow sudo on npm?