npm global path prefix

Extending your PATH with: export PATH=/usr/local/share/npm/bin:$PATH isn’t a terrible idea. Having said that, you shouldn’t have to do it. 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 … Read more

How to permanently set $PATH on Linux/Unix [closed]

You need to add it to your ~/.profile or ~/.bashrc file.  export PATH=”$PATH:/path/to/dir” Depending on what you’re doing, you also may want to symlink to binaries: cd /usr/bin sudo ln -s /path/to/binary binary-name Note that this will not automatically update your path for the remainder of the session. To do this, you should run: source … Read more