# האם זה נורמלי לקחת יותר מ-1900 שניות ב-yarn install במהלך בנייה מחדש?

**URL:** https://meta.discourse.org/t/is-it-normal-to-take-more-than-1900-seconds-in-yarn-install-during-rebuild/222805
**Category:** Self-hosting
**Created:** [1 באפריל,‏ 2022,‏ 11:25am UTC](https://meta.discourse.org/t/is-it-normal-to-take-more-than-1900-seconds-in-yarn-install-during-rebuild/222805 "2022-04-01T11:25:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![topological](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@topological](https://meta.discourse.org/u/topological)
#### Post date: [1 באפריל,‏ 2022,‏ 11:25am UTC](https://meta.discourse.org/t/is-it-normal-to-take-more-than-1900-seconds-in-yarn-install-during-rebuild/222805/1 "2022-04-01T11:25:38Z")

</div>

Hello everyone! I’m running a server locating in China. I know it is hard to connect to github and npm mirror, so I set up a network proxy in `containers/app.yml` by

```plaintext
templates:
  - "templates/web.china.template.yml"
...
env:
  HTTP_PROXY: http://172.17.0.1:10808
  HTTPS_PROXY: http://172.17.0.1:10808
  ALL_PROXY: http://172.17.0.1:10808

```

This works fine until Discourse use ember-cli to build frontend assets in rebuilding. So I set the npm registry to a mirror server (in China) by

```plaintext
hooks:
  after_bundle_exec:
    - exec:
        cmd:
          - su discourse -c 'git config --global http.proxy $HTTP_PROXY'
          - su discourse -c 'git config --global http.proxy $HTTPS_PROXY'
          - su discourse -c 'yarn config set registry https://registry.npmmirror.com/'

```

Though this can build an image successfully, it take too much time (more than 1900 seconds) in executing `su discourse -c 'yarn install --production && yarn cache clean'"` when I need to upgrade a instance.

I wonder if this is normal or how to decrease the time. Thanks!
