官网

https://nodejs.org/zh-cn


下载

https://nodejs.org/zh-cn/download


tyarn

使用阿里云流水线自动构建时出现的问题

[12:21:46] yarn install v1.15.2
[12:21:46] [1/5] Validating package.json...
[12:21:46] [2/5] Resolving packages...
[12:21:46] [3/5] Fetching packages...
[12:22:26] error An unexpected error occurred: "https://registry.yarnpkg.com/@react-spring/animated/-/animated-9.7.3.tgz: ETIMEDOUT".
[12:22:26] info If you think this is a bug, please open a bug report with the information provided in "/root/workspace/ms2019_MsOa/MsOa/yarn-error.log".
[12:22:26] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[12:22:49] [ERROR] BUILD ERROR
[12:22:49] [ERROR] 187634320
[12:22:49] [ERROR] 1

解决

无效操作:上面是提示timeout,刚开始第一反应是国内仓库的问题,所以增加如下修改仓库的代码,但是没效果

yarn config set registry https://registry.npm.taobao.org --global
tyarn

有效操作:

修改timeout时间

yarn config set network-timeout 300000
tyarn

可用 下面命令查看当前的timeout时间

yarn config list