安装n
方案一、
1.安装node环境
https://www.jianshu.com/p/11e1d55b1d5d
2.安装n
npm install -g n
方案二、
On macOS with Homebrew you can install the n formula.
brew install n
On Linux and macOS, n-install allows installation directly from GitHub; for instance:
curl -L https://git.io/n-install | bash
使用
安装某版本
n 4.4.2
n stable
n latest
查看已安装版本
n
移除指定版本
n rm 4.4.2