7 win 卸载node_如何从Windows完全删除node.js

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 --version, it still indicates that I'm running v0.8.11. Obviously, some stuff was left behind during the uninstall process, and it's causing me to have all sorts of errors when trying to add modules through npm. I've seen solutions to this for OSX and Linux, but couldn't find anything for Windows. I'm running Windows 7 64-bit.

解决方案

How to remove Node.js from Windows:

Take a deep breath.

Run npm cache clean --force

Uninstall from Programs & Features with the uninstaller.

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

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-*

Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.

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.

Reboot, for good measure.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值