Last active
January 24, 2016 15:23
-
-
Save rtfpessoa/bf77bc8ece80e22b59ce to your computer and use it in GitHub Desktop.
NPM install OSX
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
#!/bin/bash | |
# | |
# Correct way to install NPM and Node.js on OS X | |
# Credits: https://gist.github.com/DanHerbert/9520689 | |
# | |
rm -rf /usr/local/lib/node_modules | |
brew uninstall node npm | |
brew install node --without-npm | |
echo prefix=~/.node >> ~/.npmrc | |
curl -L https://www.npmjs.com/install.sh | sh | |
export PATH="$HOME/.node/bin:$PATH" | |
# Now you can re-install any global packages with the command below | |
npm install -g nvm diff2html-cli bower eslint jscs grunt grunt-cli json jsx react-tools |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment