安装nodejs
通过Linux自带软件库安装的nodejs往往版本较老
可以通过设置代理更新nodejs软件版本
curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
需要安装哪个版本就设置setup_18.x
对应版本数字
sudo apt-get install -y nodejs
nodejs -v
查看版本号,测试安装成功
npm更换淘宝镜像
npm config set registry https://registry.npm.taobao.org