安装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
最后修改:2024 年 05 月 12 日
如果觉得我的文章对你有用,请随意赞赏