网站下载
https://nodejs.org/en/download/
解压缩
xz -d node.tar.xz
tar -xvf node.tar
加入到path
vim /etc/profile
export PATH=/usr/local/node-v12.16.1-linux-x64/bin/:$PATH
扫描二维码关注公众号,回复:
9454604 查看本文章
镜像加速
- npm config set registry=https://registry.npm.taobao.org
设置缓存
npm config set prefix "D:\system\nodejs\node_global"
npm config set cache "D:\system\nodejs\node_cache"