How to completely remove node.js from Windows

前端 未结 8 1412
無奈伤痛
無奈伤痛 2020-11-22 01:37

I uninstalled my previous version of node.js (0.8.11) and downloaded the latest, 0.10.24 from the node.js website and installed it. However, after running node --versi

相关标签:
8条回答
  • 2020-11-22 02:17

    I actually had a failure in the Microsoft uninstall. I had installed node-v8.2.1-x64 and needed to run version node-v6.11.1-x64.

    The uninstalled was failing with the error: "Windows cannot access the specified device, path, or file" or similar.

    I ended up going to the Downloads folder right clicking the node-v8.2.1-x64 MSI and selecting uninstall.. this worked.

    Regards, Jon

    0 讨论(0)
  • 2020-11-22 02:17

    I had the same problem with me yesterday and my solution is: 1. uninstall from controlpanel not from your cli 2. download and install the latest or desired version of node from its website 3. if by mistake you tried uninstalling through cli (it will not remove completely most often) then you do not get uninstall option in cpanel in this case install the same version of node and then follow my 1. step

    Hope it helps someone.

    0 讨论(0)
  • 2020-11-22 02:21

    Scenario: Removing NodeJS when Windows has no Program Entry for your Node installation

    I ran into a problem where my version of NodeJS (0.10.26) could NOT be uninstalled nor removed, because Programs & Features in Windows 7 (aka Add/Remove Programs) had no record of my having installed NodeJS... so there was no option to remove it short of manually deleting registry keys and files.

    Command to verify your NodeJS version: node --version

    I attempted to install the newest recommended version of NodeJS, but it failed at the end of the installation process and rolled back. Multiple versions of NodeJS also failed, and the installer likewise rolled them back as well. I could not upgrade NodeJS from the command line as I did not have SUDO installed.

    SOLUTION: After spending several hours troubleshooting the problem, including upgrading NPM, I decided to reinstall the EXACT version of NodeJS on my system, over the top of the existing installation.

    That solution worked, and it reinstalled NodeJS without any errors. Better yet, it also added an official entry in Add/Remove Programs dialogue.

    Now that Windows was aware of the forgotten NodeJS installation, I was able to uninstall my existing version of NodeJS completely. I then successfully installed the newest recommended release of NodeJS for the Windows platform (version 4.4.5 as of this writing) without a roll-back initiating.

    It took me a while to reach sucess, so I am posting this in case it helps anyone else with a similar issue.

    0 讨论(0)
  • 2020-11-22 02:23

    Whatever Node.js version you have installed, run its installer again. It asks you to remove Node.js like this:

    0 讨论(0)
  • 2020-11-22 02:26

    In my case, the above alone didn't work. I had installed and uninstalled several versions of nodejs to fix this error: npm in windows Error: EISDIR, read at Error (native) that I kept getting on any npm command I tried to run, including getting the npm version with: npm -v.

    So the npm directory was deleted in the nodejs folder and the latest npm version was copied over from the npm dist: and then everything started working.

    0 讨论(0)
  • 2020-11-22 02:27

    How to remove Node.js from Windows:

    1. Take a deep breath.

    2. Run npm cache clean --force

    3. Uninstall from Programs & Features with the uninstaller.

    4. Reboot (or you probably can get away with killing all node-related processes from Task Manager).

    5. Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:

      • C:\Program Files (x86)\Nodejs
      • C:\Program Files\Nodejs
      • C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
      • C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
      • C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
      • C:\Users\{User}\AppData\Local\Temp\npm-*
    6. Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.

    7. If it's still not uninstalled, type where node at the command prompt and you'll see where it resides -- delete that (and probably the parent directory) too.

    8. Reboot, for good measure.

    0 讨论(0)
提交回复
热议问题