Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout error on yarn install with date-fns@next on Dockerhub #1004

Closed
Dvisacker opened this issue Dec 10, 2018 · 6 comments · Fixed by whisthq/whist#671
Closed

Timeout error on yarn install with date-fns@next on Dockerhub #1004

Dvisacker opened this issue Dec 10, 2018 · 6 comments · Fixed by whisthq/whist#671

Comments

@Dvisacker
Copy link

I'm receiving the following error (see bottom of the log below) when doing a yarn install using the date-fns@next package. Everything is working fine with the non-alpha versions and I can also do the install from my computer and wget the package url without any problem.

Building in Docker Cloud's infrastructure...
Cloning into '.'...

KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'18.03.1-ee-3', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2018-08-30T18:42:30.000000000+00:00', u'ApiVersion': u'1.37', u'MinAPIVersion': u'1.12', u'GitCommit': u'b9a5c95', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.10.2'}}]
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
Platform: {u'Name': u''}
Version: 18.03.1-ee-3
MinAPIVersion: 1.12
GitCommit: b9a5c95
Os: linux
GoVersion: go1.10.2
Starting build of index.docker.io/proofsuite/amp-client:latest...
Step 1/19 : FROM node as builder


 ---> 37f455de4837

Step 2/19 : RUN mkdir /usr/src/app


 ---> Running in ee9fff5fc879

Removing intermediate container ee9fff5fc879

 ---> 6003512c2925

Step 3/19 : WORKDIR /usr/src/app


Removing intermediate container a333d4a70ded

 ---> aff5b84b868d

Step 4/19 : ENV PATH /usr/src/app/node_modules/.bin:$PATH


 ---> Running in 0dbaf1809ed3

Removing intermediate container 0dbaf1809ed3

 ---> fe832a7228ea

Step 5/19 : COPY package.json /usr/src/app/package.json


 ---> b232399ef432

Step 6/19 : COPY public/ /usr/src/app/public/


 ---> 7324dea98d53

Step 7/19 : COPY src/ /usr/src/app/src/


 ---> 3258d87a395a

Step 8/19 : RUN yarn install --silent


 ---> Running in b397ea5ebac6

�[91mwarning react-scripts > autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning react-scripts > babel-preset-react-app > babel-preset-env > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning react-scripts > css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning react-scripts > css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning react-scripts > css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning react-scripts > eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
�[0m
�[91mwarning @storybook/react > @storybook/core > autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
�[0m
�[91mwarning enzyme > rst-selector-parser > nearley > nomnom@1.6.2: Package no longer supported. Contact support@npmjs.com for more info.
�[0m
�[91merror An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.0-alpha.25.tgz: ESOCKETTIMEDOUT".
�[0m
Removing intermediate container b397ea5ebac6

The command '/bin/sh -c yarn install --silent' returned a non-zero code: 1

Cheers

@kossnocorp
Copy link
Member

That is either npm or your local network problem, and date-fns has nothing to with it, sorry.

@jamiehd
Copy link

jamiehd commented Sep 11, 2019

@kossnocorp weirdly I have exactly the same problem with this package specifically on dockerhub. It installs fine locally. Do you know of any reason why this would specifically affect your package? Does it do anything specific that takes longer than other packages? Thanks

@yuki-takei
Copy link

yuki-takei commented Sep 16, 2019

@jamiehd
Maybe because CPUs of dockerhub are too weak. Try to increase network-timeout of yarn.

# 300sec
yarn config set network-timeout 300000

Though I faced the same problem (always occured ESOCKETTIMEDOUT for date-fns), this worked for me.

@jamiehd
Copy link

jamiehd commented Sep 19, 2019

@jamiehd
Maybe because CPUs of dockerhub are too weak. Try to increase network-timeout of yarn.

# 300sec
yarn config set network-timeout 300000

Though I faced the same problem (always occured ESOCKETTIMEDOUT for date-fns), this worked for me.

Thanks for the tip @yuki-takei I'll give that a go.

@saobei
Copy link

saobei commented Apr 23, 2020

@jamiehd
Maybe because CPUs of dockerhub are too weak. Try to increase network-timeout of yarn.

# 300sec
yarn config set network-timeout 300000

Though I faced the same problem (always occured ESOCKETTIMEDOUT for date-fns), this worked for me.

solve this problem

@durvalprintes
Copy link

Thx, problem solved!

badrihippo added a commit to badrihippo/ghost_ynh that referenced this issue Aug 13, 2022
We often run into the error, `An unexpected error occurred:
"https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.1.tgz:
ESOCKETTIMEDOUT".` This seems to be a common problem with the
date-fns package, as well as other large packages installed with
older versions of Yarn. See for example the following GitHub
issues:

date-fns/date-fns#1004
yarnpkg/yarn#8242

The problem seems to be related to slow hard-disk access on the
client server/VPS - so it's actually the storage connection and
not the Internet connection, that's timing out.

A common workaround for this is to increase the network timeout
for Yarn long enough for the build will complete, which is what
we're doing in this case since it's likely to affect a lot of the
slower setups (including, as it seems, the YunoHost CI!). For
everyone else, the worst case is that they'll have to wait 10
minutes before they realise there's actually something wrong with
the network.
tahini added a commit to tahini/transition that referenced this issue Mar 18, 2024
On docker hub, there are often timeouts when loading packages. This is a
suggested workaround (see
date-fns/date-fns#1004)
tahini added a commit to tahini/transition that referenced this issue Mar 18, 2024
On docker hub, there are often timeouts when loading packages. This is a
suggested workaround (see
date-fns/date-fns#1004)
tahini added a commit to chairemobilite/transition that referenced this issue Mar 18, 2024
On docker hub, there are often timeouts when loading packages. This is a
suggested workaround (see
date-fns/date-fns#1004)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants