1、首先安装n模块
这里需要全局安装,命令如下:
npm install -g n
2.1、升级node.js到最新稳定版
命令如下:
n stable
2.2、升级到指定版本
n x.x.x
https://my.oschina.net/blogshi/blog/260953