0

I can't update nodejs to the latest version in any way.

MacBook-Pro:claudiofiamingo$ node -v

v6.9.0

MacBook-Pro:claudiofiamingo$ sudo npm cache clean -f

Password: npm WARN using --force I sure hope you know what you are doing.

MacBook-Pro:claudiofiamingo$ sudo npm install -g n

/Users/claudiofiamingo/.nvm/versions/node/v6.9.0/bin/n -> /Users/claudiofiamingo/.nvm/versions/node/v6.9.0/lib/node_modules/n/bin/n + n@4.1.0 updated 1 package in 0.514s

MacBook-Pro:claudiofiamingo$ sudo n stable

MacBook-Pro:claudiofiamingo$ node -v

v6.9.0

Why? The version of nodejs are the same: v6.9.0 !!!!

Joe Clay
  • 33,401
  • 4
  • 85
  • 85

1 Answers1

0

After you select sudo n you will have a list of versions (as per your comment), simply use your arrow keys to select/highlight the version you require and press enter.

Intellidroid
  • 1,053
  • 1
  • 9
  • 15
  • I did it but the version remain the same: – Claudio Fiamingo Jul 15 '19 at 12:11
  • node/10.16.0 MacBook-Pro:~ claudiofiamingo$ node -v v6.9.0 – Claudio Fiamingo Jul 15 '19 at 12:11
  • Infact, when i try to run gekko, i get this error: ERROR: Your local version of Node.js is too old. You have v6.9.0 and you need atleast >=8.11.2 – Claudio Fiamingo Jul 15 '19 at 12:14
  • have a look at this it is a similar issue to yours...essentially you have two node installs (n [nvm] as well as and vanilla install) https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x – Intellidroid Jul 15 '19 at 12:18
  • unbelievable, I can't uninstall node in any way .. even canceling directories – Claudio Fiamingo Jul 15 '19 at 12:43
  • Yes I prefer to use brew if I am going to install a local version of node (and not use a version manager). It is then pretty easy to uninstall. But I feel your pain – Intellidroid Jul 15 '19 at 12:56
  • MacBook-Pro:home claudiofiamingo$ brew upgrade node Warning: You are using macOS 10.11. We (and Apple) do not provide support for this old version. You will encounter build failures with some formulae. Please create pull requests instead of asking for help on Homebrew's GitHub, Discourse, Twitter or IRC. You are responsible for resolving any issues you experience, as you are running this old version. Error: node not installed MacBook-Pro:home claudiofiamingo$ node -v v6.9.0 – Claudio Fiamingo Jul 15 '19 at 13:00
  • is there a reason you are using macOS 10.11? – Intellidroid Jul 15 '19 at 13:19
  • If you look at the errors you are getting on brew install this might be the issue? – Intellidroid Jul 15 '19 at 13:54
  • I updated the system but I can't update the node in any way .. it always remains the same version, I don't know what to do anymore, thanks all the same. – Claudio Fiamingo Jul 15 '19 at 15:15
  • it is also impossible to remove it. – Claudio Fiamingo Jul 15 '19 at 15:21