11

I'm trying to use node 8.9.1 but when trying to update using brew it says 8.9.1 is already installed

James-MacBook:~ james$ brew upgrade node
Error: node 8.9.1 already installed

But when checking the version it shows

James-MacBook:~ james$ node --version
    v0.10.48

So then I tried to switch to 8.9.1

James-MacBook:~ james$ brew switch node 8.9.1
Cleaning /usr/local/Cellar/node/8.9.1
7 links created for /usr/local/Cellar/node/8.9.1

But it is still showing as 0.10.48

James-MacBook:~ james$ node --version
v0.10.48
JaAnTr
  • 766
  • 3
  • 11
  • 26

2 Answers2

15

It sounds like you have some version of node that is installed without using Homebrew.

  1. First of all, check if you installed your node with nvm by check if you have a .nvm directory in home directory ls -la
    1. if you do, remove that directory
    2. brew update && brew install node@8 (whichever node you want)
    3. brew unlink node@0
    4. brew link --force node@8
    5. Do brew update && brew upgrade node@8

Happy coding

willyhakim
  • 308
  • 3
  • 9
1

Nvm package... kind of slows down your terminal upon startup. I found it annoying....

You can always just uninstall node and install node that’s compatible with npm on Nodejs.org link below

All node version link <- !

look for pkg if your mac user, and msi for windows users

youllbehaunted
  • 353
  • 2
  • 7