I'm trying: sudo n stable and get: installed: v14.17.6 (with npm 6.14.15) but the version is still old: node -v v11.14.0
I cannnot update node with n
698 Views Asked by Vladyslav Shpil'man At
3
There are 3 best solutions below
0
On
You may have more than one version of node installed, and when you run node the "other" version is found earlier in your PATH.
Check where the active version is with:
$ command -v node
/usr/local/bin/node
You can run n doctor which has checks for some setup problems including this.
$ n doctor
...
CHECKS
Checking n install destination is in PATH...
good
Checking n install destination priority in PATH...
good
...
What OS are you using? If it's macOS or Linux, you can simply override the current version on your machine by installing the node version of your choice. You can download and install node from:
https://nodejs.org/en/
Or, you can use a version manager like nvm to switch between different versions of node. nvm can be installed on Linux and macOS.
https://github.com/nvm-sh/nvm
If you are using Windows, simply download the installer executable file from the first link and follow the steps shown by installer.