Created
December 3, 2013 10:53
-
-
Save ankitthakur/7767357 to your computer and use it in GitHub Desktop.
npm global path prefix
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
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