I've been trying to update npm on windows and found this post which provided a solution where the following commands were supposed to be run:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
The first command executes seemingly correctly, but when I try running the second one, I get this log which seems to indicate that a version of windows upgrade needs to be specified. So I then ran:
npm install -g npm-windows-upgrade 6.9.1
and got this error log
Of course when the last command of npm-windows-upgrade
is run, I get the error that it isn't recognized. The other SO post had a solution for either removing both of these files:
C:\Program Files (x86)\nodejs\npm
C:\Program Files (x86)\nodejs\npm.cmd
or
running this command in an elevated powershell:
npm install npm@latest
As I don't have admin rights (and can't really acquire them) on my computer and given that both of these options require admin rights, how can I go about upgrading node.js on Windows?