how to update npm in windows code example

Example 1: update npm

npm install -g npm@latest

Example 2: update npm-windows

powershell Set-ExecutionPolicy RemoteSigned
npm install -g npm-windows-upgrade
npm-windows-upgrade

Example 3: how to update npm

npm install -g npm

Example 4: how to update npm

npm install -g npm

Example 5: how to update npm version in windows

On Win10:
Run PowerShell as Administrator and sequentially enter commands:

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

Example 6: npm latest version windows

npm-windows-upgrade --npm-path "C:\nodejs"