jodeJS安装淘宝镜像代码
以下是使用淘宝镜像安装 Node.js 的代码:
- 安装 nvm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- 安装 Node.js:
nvm install 12.18.4
- 配置淘宝镜像:
npm config set registry https://registry.npm.taobao.org/
- 验证是否配置成功:
npm config get registry
输出应该为 https://registry.npm.taobao.org/。
- 安装其他需要的包:
npm install -g nodemon pm2
以上代码仅供参考,具体情况请根据实际需要进行修改。
原文地址: https://www.cveoy.top/t/topic/bf96 著作权归作者所有。请勿转载和采集!