Skip to content

Instantly share code, notes, and snippets.

@ankitthakur
Created December 3, 2013 10:53
Show Gist options
  • Save ankitthakur/7767357 to your computer and use it in GitHub Desktop.
Save ankitthakur/7767357 to your computer and use it in GitHub Desktop.
npm global path prefix
npm global path prefix:
Extending your PATH with
$ export PATH=/usr/local/share/npm/bin:$PATH
Run this:
$ npm config get prefix
The default on OS X is /usr/local, which means that npm will symlink binaries into /usr/local/bin, which should already be on your PATH (especially if you're using Homebrew).
So:
$ npm config set prefix /usr/local (if it's something else)
If you installed npm as sudo (sudo brew install), try reinstalling it with plain ol' brew install. Homebrew is supposed to help keep you sudo-free.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment