run npm with new version code example Example 1: update npm npm install -g npm@latest Example 2: npm latest version windows npm-windows-upgrade --npm-path "C:\nodejs"