Skip to content

Instantly share code, notes, and snippets.

@nilsnh
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilsnh/ebf4611159e5f826e67e to your computer and use it in GitHub Desktop.
Save nilsnh/ebf4611159e5f826e67e to your computer and use it in GitHub Desktop.
How to remove the need of sudo when doing npm -g
Quick guide for installing node through NVM in a way that avoids the use of sudo.
1. [First read this](http://stackoverflow.com/a/24404451)
2. [Then add this fix.](https://github.com/creationix/nvm/issues/586#issuecomment-68220064)
Now doing npm install -g yo won't make this complaint:
[Error] npm root value is not in your NODE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment