升级node至最新

in note-timknip •  4 years ago 

npm install -g n
n stable

只需要这二行命令,不需要自己编译

Ubuntu18.04 默认安装了 Nodejs v8.x 版本

$ curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh $ sudo bash nodesource_setup.sh $ sudo apt install nodejs # 需要从源代码编译代码的 NPM 包 $ sudo apt install build-essential

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!