Closed id77 closed 6 years ago
You shouldn't close issues unless you solve them or inform people about what could go wrong.
I ran yarn while building my docker image and had the same issue as mentioned. Restarting the docker daemon solved it for me.
rm -rf /Users/xxx/.config/yarn/global/yarn.lock
@xdkaka Thanks, that worked for me! Seems that yarn.lock
had some old private repository urls set.
--network-timeout 1000000 fixed it for me but took a long time to install just one package - @material-ui/icons
In my case, I deleted yarn.lock file. Then it works well.
yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/npm/-/npm-6.14.8.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/runner/work/timelapser/timelapser/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Github Actions, MacOS runner.
yarn install --network-timeout 1000000
Did the trick for me:⇒ yarn install --network-timeout 1000000 yarn install v1.3.2 [1/4] 🔍 Resolving packages... warning react-native > connect@2.30.2: connect 2.x series is deprecated warning react-native > fbjs-scripts > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "jest-expo > babel-jest@21.2.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0". [4/4] 📃 Building fresh packages... success Saved lockfile. ✨ Done in 234.36s.
IT WORKD FOR ME! THANK YOU VERY MUCH DUDE
I guess there isn't "one size fit all" solution for this error. In my case there was a cyberark process on my i5 computer hogging all the resources. I force ended that process and the error went away. I think it has to do with antivirus. I'm sure it will come when i restart the pc. Such a waste of time working on windows.
I get the same problem when I try to install yarn inside docker
Step 6/10 : COPY package.json yarn.lock ./
---> 72e0f798190d
Step 7/10 : RUN yarn --frozen-lockfile --check-files
---> Running in de083b1b3bac
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/escape-regexp/-/escape-regexp-0.0.1.tgz: ETIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The command '/bin/sh -c yarn --frozen-lockfile --check-files' returned a non-zero code: 1
Error: Process completed with exit code 1.
rm -rf /Users/xxx/.config/yarn/global/yarn.lock
Try it, works for me
npx audit fix
Works for me.
For me
yarn add <yourPackage> --network-timeout 36000
worked in almost all cases, but while installing @material-ui/icons, I get this message and it errors out. Tried adding it manually to package.json then deleting node_modules andj yarn.lock did not work either.
The timeout logic is less aggressive in v2 so it will probably work for you there https://yarnpkg.com/getting-started/migration
--network-timeout 1000000 fixed it for me but took a long time to install just one package - @material-ui/icons
Same.
I am facing the same issue on Windows and setting timeout does not resolve it. On the other hand npm works fine.
The same as me
I cloned a project and I looked at the value of yarn.lock, package key 'resolved', which starts with 'http://npm.byted.org'.
I think this is the author custom yarn registry, but I can not visit 'http://npm.byted.org', but yarn config did not fix it.