Skip to content

linux升级node

date: 2020-07-21 16:46:12 tags: [linux]

升级node

查看当前node版本

bash
$ node -v

清除node的cache

bash
$ npm cache clean -f

安装n模块,n模块是专门用来管理node的版本

bash
$ npm install -g n

$ n -V   // 查看版本

升级node

bash
$ n 12.18.3  // 升级node 到指定版本, 如12.18.3

$ n stable   // 升级node到最新稳定版

京ICP备2024093538号-1