-1

How can I update Nodejs ('m using to the latest) versions?

which one will be best option ?

  • npm do it
  • reinstall node and npm to get the next versions?
  • 1
    Does this answer your question? [How can I update NodeJS and NPM to the next versions?](https://stackoverflow.com/questions/6237295/how-can-i-update-nodejs-and-npm-to-the-next-versions) – AlexZeDim Jul 23 '20 at 18:13
  • 1
    Also, take a look at NVM (https://github.com/nvm-sh/nvm/blob/master/README.md) – AlexZeDim Jul 23 '20 at 18:14

1 Answers1

0

For minor version updates, your OS should prompt you to update as they come out, usually within 1 or 2 weeks. For major version updates though I believe there is no way to do it automatically, so you'll have to download the latest version and re-install.

As for npm, it can be used to update itself, in fact you'll usually get a message when npm is out-of-date, but it can't update the nodejs binary.

William Perron
  • 1,288
  • 13
  • 18