在jenkins进行iOS组包过程中,控制台报如下错误:
FetchError: request to https://static.realm.io/downloads/sync/realm-sync-cocoa-4.7.3.tar.gz failed, reason: getaddrinfo ENOTFOUND static.realm.io
at ClientRequest.<anonymous> (/Users/yvonnepan/test/out/shq5785/node_modules/realm/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (node:events:365:28)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:365:28)
at emitErrorNT (node:internal/streams/destroy:193:8)
at emitErrorCloseNT (node:internal/streams/destroy:158:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ENOTFOUND',
code: 'ENOTFOUND'
}
Command PhaseScriptExecution failed with a nonzero exit code
前期对此问题已经折腾一阵,并得以修复,没想到今天再次遇到此问题,故记录之。
出现以上问题的原因是项目依赖包发生了变动,导致变动的原因是新引入了依赖包,导致原有依赖包被删除。
将原有备份的依赖包重新添加至现有项目中,问题得以解决。至于新引入依赖包后,导致原有依赖包被删除的问题需要进一步排查。