简体   繁体   English

如何更新 npm 版本?

[英]how to update npm version?

Currently I have npm version:5.5.1,but I want to update the version.As i'm trying to update,it is not updating.And I tried by uninstalling and reinstalling the node still i'm getting the same npm version of 5.5.1.目前我有 npm 版本:5.5.1,但我想更新版本。当我尝试更新时,它没有更新。我尝试通过卸载并重新安装节点仍然得到相同的 npm 版本5.5.1。

First, run PowerShell as Administrator, click Start, search for PowerShell, right-click PowerShell and select Run as Administrator.首先,以管理员身份运行PowerShell,点击开始,搜索PowerShell,右键PowerShell和Z99938282F040161859941E18以管理员身份运行。

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade

You will be prompted to select a version of NPM to install.系统会提示您安装 select 版本的 NPM。 Use arrow keys to move up and down and choose the version you want to update to and press Enter.使用箭头键上下移动并选择要更新到的版本,然后按 Enter。

看这里

If your upgrade is successful, you should see something like this.如果升级成功,您应该会看到类似这样的内容。

看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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