Skip to content

Instantly share code, notes, and snippets.

@rtfpessoa
Last active January 24, 2016 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtfpessoa/bf77bc8ece80e22b59ce to your computer and use it in GitHub Desktop.
Save rtfpessoa/bf77bc8ece80e22b59ce to your computer and use it in GitHub Desktop.
NPM install OSX
#!/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