Skip to content

Instantly share code, notes, and snippets.

@dmorosinotto
Created October 17, 2015 08:36
Show Gist options
  • Save dmorosinotto/84454079952d308dda6e to your computer and use it in GitHub Desktop.
Save dmorosinotto/84454079952d308dda6e to your computer and use it in GitHub Desktop.
Install Node.js and NPM on Mac OsX handling global package without sudo //script by johnpapa
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
@dmorosinotto
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment