Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sudo usage for npm #3

Open
reklis opened this issue Jun 16, 2015 · 3 comments
Open

Sudo usage for npm #3

reklis opened this issue Jun 16, 2015 · 3 comments

Comments

@reklis
Copy link

reklis commented Jun 16, 2015

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

@jonathanong
Copy link
Owner

? thefuck does not require sudo. i have never used it with sudo before.

@reklis
Copy link
Author

reklis commented Jun 16, 2015

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

@jonathanong
Copy link
Owner

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants