LoginSignup
4
2

More than 5 years have passed since last update.

Windowsでnpmのバージョンをサクッと変更する方法

Posted at
  1. StartでPowerShellと検索します
    Windows PoweShellというものが出てくると思います。(出てこなかった場合は…すみません分かりません)
    それを右クリックして、「管理者として実行する」を選びます

  2. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
    システムに対してスクリプトを実行できるようにこのコマンドを実行します。

  3. npm install --global --production npm-windows-upgrade
    アップグレードツールをインストールします

  4. npm-windows-upgrade
    後は実行するのみです。バージョンがいくつか並んで出てくるので、その中から任意のものを選びます。
    ちなみに、「とりあえず最新版が欲しい」場合は下記の様なオプションがあるみたいです。

    npm-windows-upgrade --npm-version latest
    

参考:https://github.com/felixrieseberg/npm-windows-upgrade

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2