如何将npm升级到最新版本 1、查看当前版本 npm -v 2、更新到最新版本 npm install -g npm 3、更新到指定版本 npm -g install npm@5.6.0 (@后面加指定版本号)