Updating npm when using nvm-windows

This is a duplicate from my answer here: https://stackoverflow.com/a/50955293/491553

Here is how I upgrade npm when running nvm-windows:

cd %APPDATA%\nvm\v14.20.0           # or whatever node version you're using
move npm npm-old
move npm.cmd npm-old.cmd
move npx npx-old
move npx.cmd npx-old.cmd
cd node_modules\
move npm npm-old
cd npm-old\bin
node npm-cli.js i -g npm@latest --force

And boom, upgraded.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)