Skip to content

Instantly share code, notes, and snippets.

@rtfpessoa rtfpessoa/npm-install.sh
Last active Jan 24, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.