A different version of npm is installed for administrator; how to update local version?

  administrator, npm, windows

When I run npm --version at a normal command prompt, it gives a different version than when I run under an administrator command prompt, and I can’t upgrade the non-admin npm.

Screenshot of two command prompt windows showing different versions of npm installed.

Background: My computer is set up with a locked down "main" account and a separate administrator account. I can run an app "as administrator", but when doing so I have to enter the admin account credentials, and the app then runs under that account.

So when I try to upgrade npm using npm i -g npm, I get an EPERM error. But when I do the same as administrator, the upgrade succeeds but only for that other admin account.

Source: Windows Questions