npm报错 / npm下载网络超时 / jenkins vue发包失败 可能是用了老的镜像地址导致 / nvm安装nodejs网络超时
http://npm.taobao.org
和 http://registry.npm.taobao.org
将在 2022.06.30 号正式下线和停止 DNS 解析。
新域名为 npmmirror.com
, 相关服务域名切换规则请参考:
http://npm.taobao.org 改为=> http://npmmirror.com
http://registry.npm.taobao.org 改为=> http://registry.npmmirror.com
jenkins 用老地址发包会导致下面报错:
+ npm install -g yarn -registry=https://registry.npm.taobao.org npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR! request to https://registry.npm.taobao.org/yarn failed, reason: certificate has expired npm ERR! A complete log of this run can be found in: /var/jenkins_home/.npm/_logs/2024-02-02T07_21_16_601Z-debug-0.log Build step 'Execute shell' marked build as failure SSH: Current build result is [FAILURE], not going to run. Finished: FAILURE
+ npm run build npm ERR! Missing script: "build" npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run npm ERR! A complete log of this run can be found in: /var/jenkins_home/.npm/_logs/2024-02-02T08_56_57_732Z-debug-0.log Build step 'Execute shell' marked build as failure SSH: Current build result is [FAILURE], not going to run.
看教程一定要选最新的看,不然各种报错。