iscream
iscream

Reputation: 790

How to properly update Node js in windows?

I want to update my Node js to the current LTS version on my windows 7. Do I just let the current version be, and install the latest version from the website? Or do I need to delete the currently installed node? If so, how do I do that?

Upvotes: 16

Views: 68167

Answers (6)

erevos13
erevos13

Reputation: 411

The best way to have multiple versions of Node is by using nvm.

Nvm for Windows (guide)

Nvm for Windows (GitHub repo)

Upvotes: 14

Senthil
Senthil

Reputation: 777

If you install the latest stable version. Please use the below comments with the administrator command prompt

nvm install lts

Once complete the installation. You received the message

Downloading node.js version 16.15.1 (64-bit)...
Extracting...
Complete
Installation complete. If you want to use this version, type
nvm use 16.15.1

next step

nvm use 16.15.1

Upvotes: 1

Lidya
Lidya

Reputation: 1

Install nvm by running:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash in bash
or
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Then run the editor as administrator :

nvm install 14.18.1 (example the node version that you want or use lts for the latest)

nvm use 14.18.1

Make sure the node version to be used is the one installed after nvm install. If you already have one, delete it first.

node -v will give 14.18.1

Upvotes: 0

Chandima Samarakoon
Chandima Samarakoon

Reputation: 409

Follow https://phoenixnap.com/kb/update-node-js-version you can find several ways to update the node.

Upvotes: 0

Dave Ferguson
Dave Ferguson

Reputation: 176

Goto https://nodejs.org/en/download/

Download the version you want, for instance msi for windows. Run the download and it will update the version to the one you have downloaded.

Upvotes: 13

Base64__
Base64__

Reputation: 107

I believe that since npm installs Node.JS as a package (just like it would React or any other package) to your project, you can just 'npm install node' to get the latest version.

If you're looking for npm, the NPM website says this:

To update your npm, type this into your terminal:

npm install npm@latest -g

Upvotes: 1

Related Questions