前言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检查$ node -v $ npm -v