Run npm i npm to update code example
Example 1: update npm-windows
powershell Set-ExecutionPolicy RemoteSigned
npm install -g npm-windows-upgrade
npm-windows-upgrade
Example 2: how to update npm
npm install -g npm
powershell Set-ExecutionPolicy RemoteSigned
npm install -g npm-windows-upgrade
npm-windows-upgrade
npm install -g npm