美文网首页
Mac 解决nvm is not compatible with

Mac 解决nvm is not compatible with

作者: mark666 | 来源:发表于2021-08-16 11:28 被阅读0次

mac 终端打开都会报如下错误:

nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `npm config delete prefix` or `nvm use --delete-prefix v15.11.0 --silent` to unset it.

解决办法是删除并重新设置 nvm prefix

  1. 运行 nvm install v15.11.0 && nvm use --delete-prefix v15.11.0 --silent 确保npm命令可以使用;

运行 npm config delete prefix 删除 nvm prefix;

运行 npm config set prefix $NVM_DIR/versions/node/v15.11.0 设置 nvm prefix 为v15.11.0。

相关文章

网友评论

      本文标题:Mac 解决nvm is not compatible with

      本文链接:https://www.haomeiwen.com/subject/bvsmbltx.html