I just ran brew upgrade node
and it successfully upgraded Node to version >=4, however node --version
returns the old version:
My-MacBook-Pro:~ me$ node --version
v2.3.0
My-MacBook-Pro:~ me$ brew upgrade node
Error: node 4.1.1 already installed
How can I have node use the newest version instead of 2.3.0?
First of all, did you run:
brew update
prior to:
brew upgrade
You could also try linking to the correct version:
brew switch node <version>
To see which versions of node homebrew knows about:
brew info node
If you are on a MAC (as you state) then i would highly recommend using NVM to manage your node and npm versions - and avoid homebrew for this altogether (especially if support for more than one version is likely). This is the best way to install node on a MAC imho.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With