6

I am trying to upgrade my node to version 14.17.1 by running:

npm install -g [email protected]

It succeeds apparently, but when I run node -v, I still get the old version.

Is there an extra step I should take, or am I doing this wrong?

6
  • 1
    Try using nvm. Commented Nov 26, 2021 at 8:33
  • 2
    You are installing a package named node(npmjs.com/package/node), not node itself. Download the required version for the official page and install it. Or use nvm Commented Nov 26, 2021 at 8:40
  • 2
    Thank you. I looked at the package page, but there is no uninstall command. How do I undeinstal this node package that I mistakenly installed? Commented Nov 26, 2021 at 9:01
  • 1
    Did the answers solve your problem? Commented Dec 22, 2021 at 13:09
  • 2
    @MarioG8 Hi Mario, I used nvm eventually. If you can include that in your answer, I will mark it as accepted answer. Commented Dec 22, 2021 at 15:00

1 Answer 1

5

It is good to use a excellent and proven source. Visit official nodejs.org website and go to:

  1. Other Downloads
  2. Previous Releases - link
  3. Choose and Install version whatever You want, on Operating System You actually using. Good Luck ;-)

Or install and use nvm

To download, compile, and install the latest release of node, do this:

nvm install node # "node" is an alias for the latest version 

To install a specific version of node:

nvm install 14.7.0 # or 16.3.0, 12.22.1, etc 
Sign up to request clarification or add additional context in comments.

Comments