Created
May 4, 2016 00:37
-
-
Save alvin-milton/26ea08d5423f97322582dfcaae5c01e6 to your computer and use it in GitHub Desktop.
install npm properly
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
brew install node --without-npm | |
mkdir "${HOME}/.npm-packages" | |
echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.bashrc | |
echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc | |
curl -L https://www.npmjs.org/install.sh | sh | |
echo NODE_PATH=\"\$NPM_PACKAGES/lib/node_modules:\$NODE_PATH\" >> ${HOME}/.bashrc | |
echo PATH=\"\$NPM_PACKAGES/bin:\$PATH\" >> ${HOME}/.bashrc | |
echo source "~/.bashrc" >> ${HOME}/.bash_profile | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment