安装 Node.js:Linux 下安装 NVM
请尽量避免在 Ubuntu 上使用 apt-get
来安装 Node.js, 如果你已经这么做了,请手动移除:
$ sudo apt-get purge nodejs && sudo apt-get autoremove && sudo apt-get autoclean
使用以下命令安装 NVM,请前往 官网 获取最新版本更改下面的版本:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
另外,推荐对 inotify 做以下配置:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
NVM 的使用请参考: Mac 下安装 NVM