-
Install Command Line Tools (and install Xcode from Apple's Developer site -
developer.apple.com
)xcode-select --install
(or download from Apple’s Developer site) -
Install Node Version Manager:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.0/install.sh | bash
and make sure you add the following to your.bash_profile
:source ~/.nvm/nvm.sh
-
Install Node version 4, as well as any other versions you want to use. See Usage for directions on using NVM:
nvm install 4
-
Make sure you alias NVM's default to 4:
nvm alias default 4
-
Install global Node utilities:
npm install -g avn avn-nvm avn-n
and then setup AVN:avn setup
NOTE: You should do this step every time you add a new version of Node to NVM -
Add .node-version file (like the one attached) to every project directory where your
node_modules
directory resides. This will tell NVM to switch to whatever Node version is in this file as soon as youcd
into the directory.
Last active
December 28, 2015 10:20
-
-
Save K3TH3R/7593ec671e299c446f81 to your computer and use it in GitHub Desktop.
Installing NVM with automatic node version switching on `cd` into a directory for Mac OS X
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
4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment