1

After installing Node using Homebrew on OSX 10.11.6 I now have a copy of node installed at

/usr/local/Cellar/node/10.7.0.

However, the version of Node that appears when I run

$ node -v

in terminal is

v0.12.7

I would like OSX terminal to reference the v10.07 of Node I just installed via Homebrew when I type

$ node

How do I change which node version that OSX terminal recognizes?

1 Answers1

0

You should try using NVM. It allows you to install multiple versions of Node on your machine and switch between them conveniently:

see NVM docs

OllyBarca
  • 1,501
  • 1
  • 18
  • 35
  • Unfortunately, I have the same problem with NVM, I also installed it using Homebrew, but terminal doesn't recognize the $ nvm command. – Pablo Grillo Jul 20 '18 at 09:23
  • Have you added it to your local path? – OllyBarca Jul 20 '18 at 09:24
  • 1
    Take a look at this answer: https://stackoverflow.com/questions/16904658/node-version-manager-install-nvm-command-not-found – OllyBarca Jul 20 '18 at 09:24
  • This was the answer! I edited a file called .bash_profile and added "export PATH=/usr/local/Cellar/node/10.7.0/bin:$PATH" to it and now it works. Thank you very much! – Pablo Grillo Jul 20 '18 at 09:37