# 由于 yarn 超时，升级到 3.3.0-beta6 时出错

**URL:** <https://meta.discourse.org/t/error-upgrading-to-3-3-0-beta6-because-of-yarn-timeout/320526>\
**Category:** Self-hosting\
**Created:** [2024年八月7日 11:36 UTC](https://meta.discourse.org/t/error-upgrading-to-3-3-0-beta6-because-of-yarn-timeout/320526 "2024-08-07T11:36:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)\
**Post date:** [2024年八月7日 12:28 UTC](https://meta.discourse.org/t/error-upgrading-to-3-3-0-beta6-because-of-yarn-timeout/320526/8 "2024-08-07T12:28:10Z")

</div>

好的，已根据 [Stuck on yarn install, Time out](https://meta.discourse.org/t/stuck-on-yarn-install-time-out/227738) 进行修复。

供参考，我在 `/var/discourse/templates/web.template.yml` 中添加了以下代码块：

```plaintext
  - exec:
      cd: $home
      cmd:
       - su discourse -c 'yarn config set network-timeout 600000 -g'

```

在此代码块之前：

```plaintext
  - exec:
      cd: $home
      hook: yarn
      cmd:
        - |-
          if ["$version" != "tests-passed"]; then
            rm -rf app/assets/javascripts/node_modules
          fi
        - su discourse -c 'yarn install --frozen-lockfile &amp;&amp; yarn cache clean'

```

但为什么会超时？链接主题中的解决方案指出这是因为服务器配置较低（Google e2.micro 实例，2 核，1 GB RAM）。但这台服务器是 4 核，6GB 的 VPS。

---

_[View the full topic](https://meta.discourse.org/t/error-upgrading-to-3-3-0-beta6-because-of-yarn-timeout/320526)._
