# Ошибка при обновлении: ESOCKETTIMEDOUT registry.yarnpkg.com

**URL:** https://meta.discourse.org/t/error-during-the-update-esockettimedout-registry-yarnpkg-com/268613
**Category:** Self-hosting
**Created:** [16.Июнь.2023 11:54:44 UTC](https://meta.discourse.org/t/error-during-the-update-esockettimedout-registry-yarnpkg-com/268613 "2023-06-16T11:54:44Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)
#### Post date: [27.Февраль.2024 06:28:50 UTC](https://meta.discourse.org/t/error-during-the-update-esockettimedout-registry-yarnpkg-com/268613/4 "2024-02-27T06:28:50Z")

</div>

Возможно, это можно исправить, увеличив время ожидания перед тем, как yarn откажется от попытки. Я отправил pull request:

> <https://github.com/discourse/discourse_docker/pull/771>
>
> I'm testing on an Oracle Cloud VM.Standard.E2.1.Micro instance and it routinely …failed with:
> 
> \`\`\`
> I, \[2024-02-26T20:00:17.772624 #1\] INFO -- : \> cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
> warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
> warning Pattern \["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"\] is trying to unpack in the same destination "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node\_modules/wrap-ansi-cjs" as pattern \["wrap-ansi@^7.0.0"\]. This could result in non-deterministic behavior, skipping.
> error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz: ESOCKETTIMEDOUT".
> \`\`\`
> 
> Digging around I found \[an explanation\](https://mariolurig.com/coding/fixing-yarn-esockettimedout-error-discourse-setup/):
> 
> \> \*\*Here’s what is going wrong.\*\* Yarn has a default timeout that is fine if you are using the minimum recommended for Discourse, but with a \_micro\_ instance, it takes too long. To fix this, you have to manually edit one of the install scripts that runs for the new Docker container Discourse is building.
> 
> This patch increases yarns network-timeout to 600000, which solves the problem for my instances. It should have no impact on other instances except that it will take longer to fail if there is something wrong with the network.
> 
> Note: this number is in ms, so this new setting amounts to 10 minutes. The default is 60 seconds. After making this change, the \`yarn install\` step took 44.09s. \`¯\\\_(ツ)\_/¯\` Maybe double the timeout instead? I'm willing to do some testing if that seems helpful.
> 
> See also:
> 
> \* \[Stuck on yarn install, Time out\](https://meta.discourse.org/t/stuck-on-yarn-install-time-out/227738)
> \* \[Discourse Installation Failure on Fresh Server: FAILED TO BOOTSTRAP\](https://meta.discourse.org/t/discourse-installation-failure-on-fresh-server-failed-to-bootstrap/264143)

Вы можете внести это изменение вручную, как объяснил [Mario Lurig](https://mariolurig.com/):

> **[Fixing Yarn ESOCKETTIMEDOUT Error During Discourse Setup | Mario Lurig](https://mariolurig.com/coding/fixing-yarn-esockettimedout-error-discourse-setup/)**
>
> While installing Discourse on a free tier instance in a Google Cloud Compute Instance, I was following this discourse install tutorial with only minor adjustments: Used Ubuntu 20.04 LTS minimal Standard Disk (default is Balanced) e2.micro instance...

См. также:

- [Зависло на yarn install, тайм-аут](https://meta.discourse.org/t/stuck-on-yarn-install-time-out/227738)
- [Сбой установки Discourse на новом сервере: FAILED TO BOOTSTRAP](https://meta.discourse.org/t/discourse-installation-failure-on-fresh-server-failed-to-bootstrap/264143)

---

_[View the full topic](https://meta.discourse.org/t/error-during-the-update-esockettimedout-registry-yarnpkg-com/268613)._
