Full reinstall of Node.js

Full reinstall of Node.js >Node.js reinstallation is an often solution to problems with frontend packages. I described one of them a few weeks ago - npm ERR! peerinvalid. What is funny, recently I have got a few different NPM errors on different computers. A solution was one - Node.js reinstallation. Although it seems straight forward, sometimes it is not. In one of my cases Node.js was so old that the new installation package could not find it and delete it properly so I had to do it manually. This post describes the steps of removing Node.js completely from a computer to make place for a new installation.

restartNode.js reinstallation is an often solution to problems with frontend packages. I described one of them a few weeks ago - npm ERR! peerinvalid. What is funny, recently I have got a few different NPM errors on different computers. A solution was one - Node.js reinstallation. Although it seems straight forward, sometimes it is not. In one of my cases Node.js was so old that the new installation package could not find it and delete it properly so I had to do it manually. This post describes the steps of removing Node.js completely from a computer to make place for a new installation.

 

  1. Delete the nodejs directory. It usually is c:\Program Files\nodejs\ or c:\Program Files (x86)\nodejs\.
  2. Delete NPM data and NPM cache directories. They are npm and npm-cache in c:\Users\DbaPresents\AppData\Roaming\.
  3. Run regedit.exe from the Run command on the Start menu (in Windows OS) and delete the following registry folders:
    • HKEY_CURRENT_USER\SOFTWARE\Node.js
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{1e2e15d7-3760-470e-8699-b9db5248edd5}

Good luck!