How do I update npm on Windows?

后端 未结 12 830
时光说笑
时光说笑 2020-12-04 09:37

When I install node 0.10.33 from the msi ( http://nodejs.org/download/ ), I get an old version of npm (1.4.28). How can I upgrade npm on Windows?

npm install

12条回答
  •  我在风中等你
    2020-12-04 10:04

    You need to follow the Windows upgrade instructions

    https://www.npmjs.com/package/npm-windows-upgrade

    First, ensure that you can execute scripts on your system by running the following command from an elevated PowerShell. To run PowerShell as Administrator, click Start, search for PowerShell, right-click PowerShell and select Run as Administrator.

    1. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
    2. npm install --global --production npm-windows-upgrade
    3. npm-windows-upgrade

    Want to just install the latest version? 1.npm-windows-upgrade --npm-version latest

提交回复
热议问题