yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Error in GitHub actions workflow : There appears to be trouble with your network connection. Retrying... #9004

Open ankita-p17 opened 8 months ago

ankita-p17 commented 8 months ago

I'm encountering an issue that is a blocker for our Production deployment while using Docker build in my GitHub Actions workflow. The error message I'm receiving -

13 202.8 warning jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin 13 224.5 [2/4] Fetching packages... 13 275.6 info There appears to be trouble with your network connection. Retrying... 13 309.3 info There appears to be trouble with your network connection. Retrying... 13 315.0 info There appears to be trouble with your network connection. Retrying... 13 342.8 info There appears to be trouble with your network connection. Retrying... 13 348.4 info There appears to be trouble with your network connection. Retrying... 13 376.5 info There appears to be trouble with your network connection. Retrying... 13 382.5 info There appears to be trouble with your network connection. Retrying... 13 407.6 info There appears to be trouble with your network connection. Retrying... 13 416.3 info There appears to be trouble with your network connection. Retrying... 13 441.0 info There appears to be trouble with your network connection. Retrying... 13 454.8 error An unexpected error occurred: "https://registry.yarnpkg.com/class-validator/-/class-validator-0.13.2.tgz: ESOCKETTIMEDOUT". 13 454.8 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log". 13 454.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 13 475.0 info There appears to be trouble with your network connection. Retrying... 13 509.2 info There appears to be trouble with your network connection. Retrying... 13 ERROR: process "/bin/sh -c yarn" did not complete successfully: exit code: 1

[build 6/10] RUN yarn:

454.8 error An unexpected error occurred: "https://registry.yarnpkg.com/class-validator/-/class-validator-0.13.2.tgz: ESOCKETTIMEDOUT". 454.8 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log". 454.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 475.0 info There appears to be trouble with your network connection. Retrying... 509.2 info There appears to be trouble with your network connection. Retrying... Dockerfile:13

11 |
12 | #Install app dependencies using the npm ci command instead of npm install 13 | >>> RUN yarn 14 |
15 | COPY . . ERROR: failed to solve: process "/bin/sh -c yarn" did not complete successfully: exit code: 1 Error: Process completed with exit code 1.

This issue occurs when running the following workflow step:


- name: Build and tag Docker image
  run: docker build --platform=linux/arm64/v8 -t my-image:latest .
guanzo commented 8 months ago

Same

#23 298.8 error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz: ESOCKETTIMEDOUT".

But that url works for me.

This is blocking my deploys. Any ideas?

narthanaj commented 7 months ago

Those workarounds are work for me.

This one is faster than the others

My project doesn't have a lock file so npm install works for me.

Also, this could works

ankita-p17 commented 6 months ago

I've changed by base image from node:16-slim to node:16 This issue we are mostly facing on slim image