Created
September 17, 2017 12:11
-
-
Save flumono/84bb37f9e3780f8cb30d8b9f9bdef2f6 to your computer and use it in GitHub Desktop.
Node.js NPM install on Mac 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
Node.js was installed at | |
/usr/local/bin/node | |
npm was installed at | |
/usr/local/bin/npm | |
Make sure that /usr/local/bin is in your $PATH. | |
(https://coolestguidesontheplanet.com/add-shell-path-osx/) | |
open terminal: | |
echo $PATH | |
touch ~/.bash_profile; open ~/.bash_profile | |
source ~/.bash_profile | |
in .bash_profile typed save: | |
export PATH="$HOME/usr/local/bin/node:$PATH" | |
export PATH="$HOME/usr/local/bin/npm:$PATH" | |
then: | |
newgulpsite flumono$ npm install -g npm-check-updates | |
sudo npm install -g npm-check-updates | |
—— | |
*** | |
Generally, since nothing from standard OS X installs lives in /usr/local, it's okay to have it owned by your user. | |
So, you could just type: | |
sudo chown -R $(whoami) /usr/local | |
Or if you want it specific to /usr/local/bin: | |
sudo chown -R $(whoami) /usr/local/bin | |
Also, your permission modes are off—ideally /usr/local/bin should be accessible by others too: | |
sudo chmod -R u=rwX,go=rX /usr/local/bin | |
*** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment