Created
July 17, 2015 23:43
-
-
Save indexzero/3ea8c22efea46f70b398 to your computer and use it in GitHub Desktop.
Make npm work good on linux and stuff.
This file contains hidden or 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
# | |
# 1. Set your npm prefix to ~/.node_modules | |
# nb. Windows users here be dragons. | |
# | |
npm c set prefix $HOME/.node_modules | |
mkdir $HOME/.node_modules | |
# | |
# 2. Update your path to give the bin location of | |
# the new prefix directory highest precedence | |
# | |
# 2(a). Open your ~/.profile (or ~/.bash_profile depending | |
# on your setup) with your favorite editor. For simplicity | |
# we'll use vim below | |
# | |
vim ~/.bash_profile | |
# | |
# 2(b). Add near the top of your profile file. If you have no | |
# idea what you're doing here just make sure it's above other | |
# "export PATH" statements | |
# | |
export PATH=$HOME/.node_modules/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment