Closed id77 closed 6 years ago
is network-timeout
documented anywhere? Google doesn't give me anything..
@torifat could you consider reopening this issue. The problem here is all the 'info There appears to be trouble with your network connection. Retrying...' messages. These occur whether or not you have a lock file. If I delete my yarn.lock
file I still get these messages. If I delete the yarn cache and lock file. I get even more.
This error message issue appears to have resurfaced by PR #6413 which recently added this message as part of a retry mechanism because or remote npm registry problems, and is usually nothing to do you 'your' end. It seems to be a congenital problem with the registry causes retries, and that being surfaced by these messages. https://github.com/yarnpkg/yarn/pull/6413/files#diff-5d246f90b159bd84bbc99f67527b1a0eR401
It seems like the problem is actually that this message is misleading.
1Gbps Internet Ubuntu 18.04 yarn 1.10.1 nodejs v8.10.0
No lock file:
$ yarn install --network-timeout=30000
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
warning @vue/cli-service > webpack-bundle-analyzer > bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
[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...
...
No cache or lock file:
yarn install --network-timeout=30000
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
warning @vue/cli-service > webpack-bundle-analyzer > bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
[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...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.4.1.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "[..]/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
@arcanis tells me that yarn 1.11+ will have a more accurate message when the retry is caused by the npm registry, as #6413 also includes a new, more accurate message that is not in yarn 1.10.x.
internalServerErrorRetrying: 'There appears to be trouble with the npm registry (returned $1). Retrying...'
@whereisaaron Can you please create a new issue? I think it's better to create a new one instead of resurrecting an old issue with lots of comments.
Sure @torifat; I didn't want to keep making duplicate issues. Right now though, this one might be resolved when 1.11 releases, so let's leave it closed, and if 1.11 still has any problem I'll open a new issue for that version specifically.
Even i m facing the issue.
Even i m facing the issue(2) in 1.12.1 release.
It happens with me when running docker build
where the base image was upgraded from FROM node:10-alpine
to node:11.1.0-alpine
.
Since I want to keep node 11 as the base image, I had to migrate my commands from yarn
to npm
.
I can confirm this happens under windows 10 with yarn 1.12.3
and node 11.1.0
.
When I changed node-version back to 8.12.0
everything works without problems (or "trouble"). (I changed the versions via nvm-windows)
Windows 10, Yarn 1.12.3, NodeJs 11.1.0
What solved my issue was to increase the network-timeout to 60 secs.
I got the same error.
try npm config set registry=https://registry.npmjs.com/
it's work for me.
Looks like yarn was trying to connect via a proxy. The following worked for me:
npm config rm proxy npm config rm https-proxy
it worked for me yeee
Was getting the same error. None of the solutions posted here helped. Rebooting my computer "fixed" it.
I was getting this error too. Rerunning the install with --verbose
told me that it was "https://registry.yarnpkg.com/@expo/traveling-fastlane-darwin/-/traveling-fastlane-darwin-1.7.1.tgz
the was causing the issue.
I tried visiting it in Chrome - sure enough, it downloaded - but then hung for a while at 100%. This usually happens when it's getting scanned. It is quite a big tarball.
Lo and behold, disable Windows Defender real-time scanning and it works fine. It seems that if the virus scanning takes too long, Yarn chalks it up as a network problem.
TLDR: if you're on windows, try disabling real-time scanning and reinstall.
I also encountered this error, using sudo yarn
after normal
E:\javascript\React\confusion>yarn add moment yarn add v1.13.0 [1/4] Resolving 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: "http://registry.npmjs.org/moment: getaddrinfo ENOTFOUND domain domain:8080". info If you think this is a bug, please open a bug report with the information provided in "E:\javascript\React\confusion\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
please help. facing the same issue.
if you have issue
info There appears to be trouble with your network connection. Retrying...
i think you must configuring proxy Use these commands ;
yarn config set proxy http://username:password@host:port yarn config set https-proxy http://username:password@host:port
Changing registry seems to fix the issue for me:
yarn install --registry https://registry.npmjs.org
I had the same problem in Windows and increasing the network timeout fixed it for me ! Thank you
Same error. To solve, just erase the yarn.lock
and run yarn
command to recreate.
if you have issue
info There appears to be trouble with your network connection. Retrying...
i think you must configuring proxy Use these commands ;
yarn config set proxy http://username:password@host:port yarn config set https-proxy http://username:password@host:port
solved the problem,thank you :-)
I ran into this issue yesterday, I cannot retrieve @material-ui/icons
with yarn. I've tried the suggestions on this thread (network timeout, changing registry, remove node_modules
and install again). However, installing with npm completes successfully.
If I visit the package URL directly, I can download it in my browser (and is only 1.2MB). Not sure what's blocking yarn.
Having this exact same issue with @material-ui/icons
too. Nothing on either windows native yarn, or yarn running under wsl with or without network timeouts extended or integrity checks disabled seems to make any difference. Likewise I can simply download the files in the browser fine. Npm installs fine.
Removing @material-ui/icons
from packages also resolve issue for me.
I got exact same @material-ui/icons
issue today. I deleted everything related with yarn in my project to solve this issue by doing rm -rf node_modules yarn.lock
in bash. I ran yarn
command after delete process is done. And issue was solved, I didn't see any errors after that.
yea @mustaphaturhan i had exactly the same issue today with @material-ui/icons as well... solved it the same way. :\
removing ~/.yarnrc
works for me
I think it just happens when the packages are very large or contain a lot of files (I also often see this message for the icon-packages of fontawesome). Maybe a time limit is not the best way to check this. You could also do a 1kb-test-ping if the time limit is exceeded. Only if it fails you can actually do a retry, otherwise everything is okay, it just takes a bit longer.
I still can't install install @material-ui/icons
. I've remove node_modules
, yarn.lock
and run yarn cache clean
, upgraded node to 10.16.0
and re-installed yarn
. I'm on Windows 10.
One oddity, I could install all packages successfully if I cloned my project into a temp directory. The problem manifests in my workspace. I've looked for hidden files, couldn't see any. Still seeing:
Error: https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.2.1.tgz: ESOCKETTIMEDOUT`
at ClientRequest.<anonymous> (C:\Users\<user>\AppData\Roaming\nvm\v10.16.0\node_modules\yarn\lib\cli.js:130217:19)
Switching my project over npm
.
I've just had the same issue because somehow npm
configured my proxy to ready apple.asd
(unsure how, I did not do this). I did yarn config list
and identified the setting that way. After removing, it worked.
If you have ip6-only network and the error occurs, you can try to workaround with adding
2606:4700::6810:1723 registry.yarnpkg.com
2606:4700::6810:1723 registry.npmjs.org
2606:4700::6810:ab63 yarnpkg.com
to /etc/hosts. You can get the ip6 with nslookup registry.yarnpkg.com
. https://github.com/yarnpkg/yarn/issues/6031
I had a very similar issue that was resolved by uninstalling and reinstalling node/npm
For me, I just remove both npm and yarn lockfile and run yarn install
again
Also had problems with @material-ui/icons
on windows 10. Disabling real time protection from windows defender as @stewartml suggested did the trick.
you can do npm config rm proxy npm config rm https-proxy for remove any proxy or if u want to use proxy u can do this $ yarn config set proxy http://my_company_proxy_url:port $ yarn config set https-proxy http://localhost:3128
or to make timeout 600000 maybe z file is big yarn config set network-timeout 600000 -g
or do this if you want to keep the default timeout as it being
yarn add
rm -rf /Users/xxx/.config/yarn/global/yarn.lock
then done
solved by reboot :D
In my case, it was working by turning off AdGuard and Windows Defender on Windows 10. I also use this command.
yarn install --network-timeout 1000000
我仍然有这个问题。增加网络超时无济于事,@ suhailgupta03的代理删除也无济于事。现在,yarn不会安装,添加或做任何事情。我已经通过三个不同的网络进行了尝试。
Adding time didn't solve my problem. It still existed and I didn't solve it
npm config rm proxy npm config rm https-proxy
I hope the above commands will help.
There are still problems.
Network speed not acquired correctly.
Network speed not acquired correctly.
Why is this closed? This continues to be an issue. Why? It has plagued my machine for weeks now, across many projects.
@allthesignals Most of the issues reported here are various configuration issues. I myself had a misc. configuration issue, for example. Things like incorrectly set proxies are a big one. There's no way to easily resolve this since it's a catch-call for weird internet problems.
Okay, thank you @ezfe. I do think the info message is inaccurate for some people's situations.
For example:
I think it just happens when the packages are very large or contain a lot of files (I also often see this message for the icon-packages of fontawesome). Maybe a time limit is not the best way to check this. You could also do a 1kb-test-ping if the time limit is exceeded. Only if it fails you can actually do a retry, otherwise everything is okay, it just takes a bit longer.
I had hhe same issue. Actually I was running the command while a streaming video process is running (netflix). So I just paused it then I ve retried again and it works without even setting timeout to infinite value.
I had the same issue, but I didn't notice it until I deleted the node_modules directory in my local repo. Then I started seeing the network error. Evidently there was an old package in my package.json that was referencing a package that was behind the company firewall (I was also not on the VPN). Once I deleted the offending package from my package.json everything worked correctly.
I had the same issue, my solution was updating the node version and the issue disappeared.
This again.
verbose 0.942 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz".
verbose 1.047 Performing "GET" request to "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz".
[##########################################################################################] 950/
It just hangs at these last two requests.
I am having this issue too on yarn version --> 1.15.2
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.