卸载 Node.js

 卸载node

依次在终端执行下面的脚本

sudo npm uninstall npm -g
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
sudo rm -rf /usr/local/include/node /Users/$USER/.npm
sudo rm /usr/local/bin/node
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d

最后验证一下

node //command not found
npm //command not found
上一篇:npm link的用法


下一篇:9.0、vue-cli环境配置超详细教程