osx-webdev-setup
osx-webdev-setup copied to clipboard
Sudo usage for npm
You are heading in the right direction but I fear you are not seeing the whole picture.
"Don't use sudo" does not combine with "use the fuck" because the fuck uses sudo. So really, you shouldn't be using either.
The proper way to fix permissions problems with npm is to create an ~/.npmrc with a prefix to $home
https://docs.npmjs.com/files/npmrc
? thefuck
does not require sudo. i have never used it with sudo before.
it's true it fixes many more things than just adding sudo to things, but it does add sudo to things. it's the very first entry in the readme and it's also all over the code
https://github.com/nvbn/thefuck/search?utf8=%E2%9C%93&q=sudo&type=Code
however, that really wasn't my point. I was trying to point out that if you configured your npmrc with a prefix to your home directory, you would not need to sudo npm install anything because your user would always have permission to their home directory
you wouldn't have to use the npmrc file if you use nvm
to use node and npm as it does its own pathing. i guess its two ways to do the same thing