参考文档:https://github.com/nvm-sh/nvm/blob/master/README.md#installing-and-updating
$ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
$ brew install nvm
$ cd ~
$ vim ~/.zshrc
# 如果是bash的话执行
$ vim .bash_profile
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
$ source ~/.zshrc
# 如果是bash的话执行
$ source .bash_profile
$ nvm ls-remote 查看 所有的node可用版本
$ nvm install xxx 下载你想要的版本
$ nvm use xxx 使用指定版本的node
$ nvm alias default xxx 每次启动终端都使用该版本的node