2019独角兽企业重金招聘Python工程师标准>>>
如果max下nvm安装node报以下错误的解决办法
nvm is not compatible with the npm config "prefix" option:
currently set to "/Users/z/.npm-global"
Run `npm config delete prefix` or `nvm use --delete-prefix v4.2.4` to unset it.
解决办法:如果是通过brew安装的nvm管理的node,则
在 ~/.bashrc, ~/.bash_profile, ~/.profile, 或者 ~/.zshrc 文件添加以下命令:
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_DIR="$HOME/.nvm"
source $(brew --prefix nvm)/nvm.sh
如果是不是通过brew而是直接安装的nvm管理的node,则
在 ~/.bashrc, ~/.bash_profile, ~/.profile, 或者 ~/.zshrc 文件添加以下命令:
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_DIR="$HOME/.nvm"
source ~/.nvm/nvm.sh