I have downloaded and installed the new version of nodejs (4.1.2) using the .msi installer. After that I ran
Run a search for multiple copies of node.exe in the usual install paths:
Get-ChildItem -File -path $env:PROGRAMFILES -include node.exe -recurse -force
Get-ChildItem -File -path "C:\Program Files (x86)" -include node.exe -recurse -force
Get-ChildItem -File -path $env:COMMONPROGRAMFILES -include node.exe -recurse -force
Get-ChildItem -File -path $env:APPDATA -include node.exe -recurse -force
Upgrading npm has its own issues:
Chances are that you attempted to upgrade npm before, it somehow failed, and you then went looking for this tool. If the tool fails to upgrade, it may be troubled by partial changes done during
npm install npmor
npm upgrade npm. In that case, you will have to completely uninstall Node:
Uninstall Node.js (select Uninstall, not the Repair option).
%programfiles%\nodejsand delete the entire folder.
Edit your PATH and remove everything that references npm (to do so, hit "Start" and search for "Environment Variables").