一、brew安装卸载nvm

安装:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

再运行:

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

卸载:cd ~

ls -a

rm -rf .nvm

移除掉 ~/.bash_profile文件中关于nvm的配置

二、nvm管理node

nvm ls

nvm ls-remote

nvm install 12

nvm uninstall 12

nvm use 12

nvm which 12