Skip to content

Instantly share code, notes, and snippets.

@sanjay1909
Created August 1, 2015 10:54
Show Gist options
  • Save sanjay1909/56df34d7fdd6c8de7849 to your computer and use it in GitHub Desktop.
Save sanjay1909/56df34d7fdd6c8de7849 to your computer and use it in GitHub Desktop.
How to get ownership of the .npm directory
// Don’t ever use npm with sudo (eg: sudo npm install) except if you want to install a package.
// Problem is permissions issue in your our Home directory.
// reclaim ownership of the .npm directory.
sudo chown -R $(whoami) ~/.npm
// the write permission in node_modules directory:
sudo chown -R $(whoami) /usr/local/lib/node_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment