简体   繁体   中英

Can I upgrade Node.js using command line in Windows?

Is it possible to update node using command line/PowerShell in windows 10 ?

Surely, I can download the latest version from the official site and install, but, I'm hoping for a way to do it from cmd .

Right now, I've npm and yarn installed on my system if that helps.

Perhaps nvm-windows is what you are looking for.

After installing this program on your computer, you will be able to use nvm command (Node Version Manager) in windows command line and manipulate with node.js versions.

Commands that you probably need are:

nvm install latest : To install the latest stable version

nvm list available : Show a list of versions available for download.

nvm use <version> : Switch to use the specified version.

More information here

Since you have npm you can use this command in powershell:

npm install npm@latest -g

If you want documentation to refer to you can use: npmjs documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM