Call + (44) 0843 289 4539

  • No products in the cart.

Install Node Version Manager with Homebrew

It is now easier than ever to get Node Version Manager up and running on Mac OSX using Homebrew.   I have previously blogged about setting up Homebrew on Mac OSX, and setting up NodeJS with NVM on Mac OSX. However now things are even easier.

Once you have Homebrew up and running on your mac now you can simply open your terminal window and execute the following commands :

$ brew install nvm

This will install Node Version manager.  There is one glitch at the time of writing, which may be resolved in a package update later.

I did need to create a ./bash_profile in order for my settings to be remembered across terminal sessions. To do this I simply fired up nano and entered in some details.

$ sudo nano ~/.bash_profile

Once I had the text editor open I provided these following details
export NVM_DIR="$HOME/.nvm"
  . "$(brew --prefix nvm)/"

Saved the file then ensured that terminal picked this up every time it ran by :
source ~/.bash_profile

Once complete I could install as many versions of NodeJS as required and I even installed the latest Version 6.

using commands:

nvm install 6.9.2
nvm install 5.7.0
nvm install 5.5.0
nvm install 5.3.0
nvm install 4.2.0
nvm install 0.12

Once you have all the versions of node you need. It is easy enough to switch between the different versions
 nvm use 6.9.2

You can check which version of node is actually currently in use, by either

 nvm current

or simply using
node -v 
Follow Me

Gary Woodfine

Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.
Follow Me