卸载了一遍 node 再次安装后 npm 就不能用了
wangjiaxindeMBP:homebrew-core wangjiaxin$ node -v
v10.9.0
wangjiaxindeMBP:homebrew-core wangjiaxin$ npm -v
-bash: npm: command not found
尝试用 brew install npm
安装 收到下面提示
wangjiaxindeMBP:homebrew-core wangjiaxin$ brew install npm
Warning: node 10.9.0 is already installed and up-to-date
To reinstall 10.9.0, run `brew reinstall node`
当然 重新安装 node 也失败了
最终https://blog.csdn.net/xinghuowuzhao/article/details/77509576找到解决办法:
从https://nodejs.org/en/下载新版,解压安装即可