mac升级系统后,发现每次打开vscode,在命令栏TERMINAL中都会出现不识别npm,把vscode重新安装后,还是不行。
vscode 遇到的迷之bug nvm is not compatible with the npm config "prefix"

最后,在万能的git上找到了解决方法,之前出错的原因使因为我曾经使用brew install node安装过node,而显示是使用nvm安装的node。只需要把之前的node删除掉,就可以了。

rm -R /usr/local/lib/node_modules/npm
rm -R /usr/local/bin/npm /usr/local/lib/node_modules/npm/bin/npm-cli.js

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2021-06-18
  • 2021-10-30
猜你喜欢
  • 2022-01-04
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案