[英]Can I upgrade Node.js using command line in Windows?
Is it possible to update node
using command line/PowerShell in windows 10 ?是否可以在Windows 10 中使用命令行/PowerShell 更新
node
?
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
.当然,我可以从官方网站下载最新版本并安装,但是,我希望有一种方法可以从
cmd
做到这一点。
Right now, I've npm
and yarn
installed on my system if that helps.现在,如果有帮助的话,我已经在我的系统上安装了
npm
和yarn
。
Perhaps nvm-windows is what you are looking for.也许nvm-windows是您正在寻找的。
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.在您的计算机上安装此程序后,您将能够在 windows 命令行中使用
nvm
命令(节点版本管理器)并使用 node.js 版本进行操作。
Commands that you probably need are:您可能需要的命令是:
nvm install latest
: To install the latest stable version nvm install latest
:安装最新的稳定版本
nvm list available
: Show a list of versions available for download. nvm list available
:显示可供下载的版本列表。
nvm use <version>
: Switch to use the specified version. nvm use <version>
:切换到使用指定的版本。
Since you have npm you can use this command in powershell:既然你有npm,你就可以在 powershell 中使用这个命令:
npm install npm@latest -g
If you want documentation to refer to you can use: npmjs documentation如果你想参考文档,你可以使用: npmjs 文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.