# EMBER\_CLI\_PROD\_ASSETS à 1 plante la précompilation des assets

**URL:** <https://meta.discourse.org/t/ember-cli-prod-assets-to-1-crashes-precompiling-assets/218548>\
**Category:** Product Support\
**Tags:** unsupported-install\
**Created:** [Février 17, 2022, 1:46 UTC](https://meta.discourse.org/t/ember-cli-prod-assets-to-1-crashes-precompiling-assets/218548 "2022-02-17T13:46:29Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![trobiyo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trobiyo/32/311872_2.png) [@trobiyo](https://meta.discourse.org/u/trobiyo)\
**Post date:** [Février 18, 2022, 4:25 UTC](https://meta.discourse.org/t/ember-cli-prod-assets-to-1-crashes-precompiling-assets/218548/12 "2022-02-18T16:25:38Z")

</div>

Juste pour information, et si cela peut être utile à quelqu’un. Il existe au moins une façon de faire fonctionner ember cli comme prévu avec un uid aléatoire, et cela consiste à s’assurer que l’uid aléatoire assigné a une entrée dans `/etc/passwd` au moment de l’exécution de l’opération `rake assets:precompile`.

Quelque chose comme :

```bash
if [`id -u` -ge 10000]; then
  cat /etc/passwd | sed -e "s/^discourse:/builder:/" > /tmp/passwd
  echo "discourse:x:`id -u`:`id -g`:,,,:/home/discourse:/bin/bash" >> /tmp/passwd
  cat /tmp/passwd > /etc/passwd
  rm /tmp/passwd
fi

```

Ainsi, la commande `app/assets/javascripts/discourse run ember build -prod` (de [discourse/assets.rake at tests-passed · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/tests-passed/lib/tasks/assets.rake#L17)) fonctionnera.

```bash
yarn run v1.22.17
$ /discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
WARNING: Node v16.13.2 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
DEPRECATION: The integration of jQuery into Ember has been deprecated and will be removed with Ember 4.0. You can either opt-out of using jQuery, or install the `@ember/jquery` addon to provide the jQuery integration. Please consult the deprecation guide for further details: https://emberjs.com/deprecations/v3.x#toc_jquery-apis
- Building
Environment: production
- Building
- building...
[WARN] (broccoli-terser-sourcemap) Minifying "assets/chunk.529.6ee9018498e97f872147.js" took: 24288ms (more than 20,000ms)
...

```

J’ai également remarqué que cette opération est assez coûteuse, consommant près de 2 Go de RAM juste pour la précompilation 😱

Cordialement,  
Ismael

---

_[View the full topic](https://meta.discourse.org/t/ember-cli-prod-assets-to-1-crashes-precompiling-assets/218548)._
