Last active
August 20, 2017 03:05
-
-
Save cookie-ag/490c4f9db7bc855e4a45dd7be9021c23 to your computer and use it in GitHub Desktop.
Using npm without sudo (OSX/Linux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goto home dir | |
- cd "${HOME}" | |
# Check where npm is installed | |
- npm config get prefix (The output is generally "/usr/local" | |
# Change the permissions | |
- sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment