I installed last version of Node.js (12.2 x64 windows)
After I run cmd as administrator and try to call any npm command (except npm -v
It happenned for me too : I installed node only for my user on Windows 10, and managed to use npm by calling it using the full path "c:\Program Files\nodejs\npm"
I solved by using "c:\Program Files\nodejs\npm" config set prefix "c:\Program Files\nodejs" (setting the prefix to the full path to npm)
And the result was :
λ cat c:\Users\\.npmrc
prefix=c:\Program Files\nodejs
Now eveything works fine.