yarn
yarn copied to clipboard
ESOCKETTIMEDOUT yarn add @mui/icons-material
I can't fetch @mui icons-material package. I've fixed this problem in the past using network-timeout 500000
but it doesn't work. I can download it with the browser and also with curl in the same terminal and it take about 3 sec. I'm behind a proxy but other packages can be fetch without issue.
Yarn version: 1.22.17 Node version: 16.13.1
I've tried with these flag but same issue
--network-timeout 500000
--https-proxy http://{domain}:443
Here's the error
$ yarn add @mui/icons-material
yarn add v1.22.17
[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/@mui/icons-material/-/icons-material-5.2.4.tgz: read ECONNRESET".
info If you think this is a bug, please open a bug report with the information provided in "C:\\{path}\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Here more details with --verbose flag
verbose 59.0146269 Performing "GET" request to "https://registry.yarnpkg.com/typescript".
verbose 67.0063018 Request "https://registry.yarnpkg.com/typescript" finished with status code 200.
verbose 67.0093117 Performing "GET" request to "https://registry.yarnpkg.com/@mui%2ficons-material".
verbose 68.0091701 Request "https://registry.yarnpkg.com/@mui%2ficons-material" finished with status code 200.
[2/4] Fetching packages...
verbose 70.2464171 Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 113.0090079 Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 164.1962125 Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 201.5115152 Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 239.7794029 Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz".
verbose 302.9353585 Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)
error An unexpected error occurred: "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.2.4.tgz: read ECONNRESET".
info If you think this is a bug, please open a bug report with the information provided in "C:\\{path}\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Related issue in material-ui repo https://github.com/mui-org/material-ui/issues/20559#issuecomment-996709859
I have the same issue on my GItlab.
Any updates on this?
Any updates on this?
am also facing same issue
Internally yarn
uses the request
package to make http requests to download the files from npm.
https://github.com/yarnpkg/yarn/blob/6db39cf0ff684ce4e7de29669046afb8103fce3d/src/util/request-manager.js#L210-L214
https://www.npmjs.com/package/request
In the couple times I've tried to dig into this, I've never been able to reproduce the issue. I can only assume that something in request
is catching the ECONNRESET
It seems like there have been a few issues filed against request
pertaining to an ECONNRESET when using a proxy. THe first couple I clicked were just closed due to inactivity https://github.com/request/request/issues?q=is%3Aissue+ECONNRESET
Has anyone tried this in Yarn 2 instead? request
and yarn 1
are both no longer receiving regular updates. Moving to yarn 2 would likely be a good plan either way.
I had the same issue with the following settings:
- node 16.14.2
- yarn 1.22.18
Using the verbose parameters, I saw that the issue was located here:
Performing "GET" request to "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.6.2.tgz"
On my side, the following command worked for me:
yarn add @mui/icons-material --network-timeout 500000
in my case: it returned network error and my connection was good but no installation of dependencies
but by this command fixed
yarn add @mui/icons-material --network-timeout 500000
try this https://github.com/yarnpkg/yarn/issues/8724#issuecomment-1301928867
I had the same issue, yarn add @mui/icons-material --network-timeout 500000 worked for me!
I am running into this same issue but can't seem to get past it. I have tried what @Jowaini has suggested and what @Whilconn to no avail.
I can fix using this flag but in a CI?
in our Dockerfile, to fix this,
....
21:29:56 116.2 info There appears to be trouble with your network connection. Retrying...
21:29:56 138.2 info There appears to be trouble with your network connection. Retrying...
21:29:56 172.5 error An unexpected error occurred: "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.11.0.tgz: ESOCKETTIMEDOUT".
21:29:56 172.5 info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
21:29:56 172.5 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
....
we can use:
...
RUN npm cache clean --force && export http_proxy="" && export https_proxy="" && yarn config delete proxy && npm config rm https-proxy && npm config rm proxy && yarn install --check-files --network-timeout 1000000
...
slowly, but works !!!