Node.js
Scoop is necessary
This guide use scoop to install this binary, if you don't have it, check this guide
Install NVM
sh
scoop install nvmCheck all versions
sh
nvm list availableInstall the last LTS
sh
nvm install 18.17.0Use new version
sh
nvm use 18.17.0Error npm update
When you try to update npm
sh
npm i -g npmYou will have this error
sh
npm ERR! code EEXIST
npm ERR! path C:\Users\user\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd
npm ERR! Refusing to delete C:\Users\user\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd: is outside C:\Users\user\scoop\apps\nvm\current\nodejs\nodejs\node_modules\npm and not a link
npm ERR! File exists: C:\Users\user\scoop\apps\nvm\current\nodejs\nodejs\npm.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-08-16T07_54_44_449Z-debug.logTo get latest NPM version from https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-788810759
Rename current npm cli
sh
mv npm npm-old
mv npm.cmd npm-old.cmd
mv npx npx-old
mv npx.cmd npx-old.cmdFind current CLI
sh
cd node_modules\
mv npm npm-old
cd npm-old\binInstall new NPM version
sh
node npm-cli.js i -g npm@latest