I just had a trouble to upgrade my npm version from 5.0.0 to 6.4.1 on Windows 10.
What i did was just downloading NodeJS (latest) installer, i.e. 8.12.0 (it includes npm 6.4.1). It was successfully installed, however when i did npm -v it still on version 5.0.0, so it only updated the node part only.
Then i follow this instruction (link), basically it uses npm package called npm-windows-upgrade, at first try it threw a lot of error.
Basically i have to do several cycles of NodeJS uninstall, NodeJS reinstall, and executing npm-windows-upgrade, after few times it finally succeeded (luck), now my npm is at 6.4.1. However when i run where npm on terminal it listed two locations of my npm files:
C:\WINDOWS\system32>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
C:\Users\XXX\AppData\Roaming\npm\npm
C:\Users\XXX\AppData\Roaming\npm\npm.cmd
and this is kind of strange, it should only listing one location, i.e. C:\Program Files\nodejs\.. but apparently i have npm too on AppData\Roaming directory, why is this happening? should i delete the second one?
PS - If i run where node, it listed only one location, i.e:
C:\WINDOWS\system32>where node
C:\Program Files\nodejs\node.exe