nvm安装卸载问题
# 安装
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
nvm //检查nvm是否安装成功
-bash: nvm: command not found //失败
# 解决
~/.bash_profile添加如下内容
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
执行文件
source ~/.bash_profile
查看是否安装成功
nvm --version
# 配置镜像源
nvm安装node时比较慢的设置,~/.zshrc添加环境变量
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
source ~/.zshrc更新环境变量
# 卸载
nvm use system
npm uninstall -g a_module