# ./launcher נכשל בבניית האפליקציה במהלך \`rake themes:update assets:precompile\`

**URL:** <https://meta.discourse.org/t/launcher-rebuild-app-failed-during-rake-themes-update-assets-precompile/212708>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [20 בדצמבר,‏ 2021,‏ 4:43pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-failed-during-rake-themes-update-assets-precompile/212708 "2021-12-20T16:43:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JackALaing](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jackalaing/32/189207_2.png) [@JackALaing](https://meta.discourse.org/u/JackALaing)\
**Post date:** [20 בדצמבר,‏ 2021,‏ 4:43pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-failed-during-rake-themes-update-assets-precompile/212708/1 "2021-12-20T16:43:22Z")

</div>

Although this was triggered when I added 2 plugins (discourse-reactions and discourse-ratings) then rebuilt the app, I know the issue is not caused by plugins because I later commented out all of them (except discourse-docker) and the rebuild still fails.

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 5607 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
21101bda0823bb7aa87a097acb0a43dde61b26e18dc39eec3e439e75871c9efe
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

I am unsure of the cause. There seem to be a few possibilities.

> **Uglifier Error**
>
> ```plaintext
> Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
> --
> e[36m 92843e[0m "use strict";
> e[36m 92844e[0m 
> e[36m 92845e[0m function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
> e[36m 92846e[0m 
> e[36m 92847e[0m var id = 0;
> e[36m 92848e[0m 
> e[36m 92849e[0m function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
> e[36m 92850e[0m 
> e[91m => e[0me[91mconst {e[0m
> e[36m 92852e[0m AbortController,
> e[36m 92853e[0m createAbortError
> e[36m 92854e[0m } = require('@uppy/utils/lib/AbortController');
> e[36m 92855e[0m 
> e[36m 92856e[0m const delay = require('@uppy/utils/lib/delay');
> e[36m 92857e[0m 
> e[36m 92858e[0m const MB = 1024 * 1024;
> e[36m 92859e[0m const defaultOptions = {
> ==
> /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:291:in `parse_result'
> /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:221:in `run_uglifyjs'
> /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:176:in `compile_with_map'
> /var/www/discourse/lib/tasks/assets.rake:135:in `compress_ruby'
> /var/www/discourse/lib/tasks/assets.rake:178:in `compress'
> /var/www/discourse/lib/tasks/assets.rake:376:in `block (6 levels) in <main>'
> /var/www/discourse/lib/tasks/assets.rake:199:in `log_task_duration'
> /var/www/discourse/lib/tasks/assets.rake:371:in `block (5 levels) in <main>'
> /var/www/discourse/lib/tasks/assets.rake:189:in `block in concurrent?'
> /var/www/discourse/lib/tasks/assets.rake:370:in `block (4 levels) in <main>'
> /var/www/discourse/lib/tasks/assets.rake:359:in `each'
> /var/www/discourse/lib/tasks/assets.rake:359:in `block (3 levels) in <main>'
> /var/www/discourse/lib/tasks/assets.rake:189:in `concurrent?'
> /var/www/discourse/lib/tasks/assets.rake:356:in `block (2 levels) in <main>'
> /var/www/discourse/lib/tasks/assets.rake:199:in `log_task_duration'
> /var/www/discourse/lib/tasks/assets.rake:355:in `block in <main>'
> /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
> /usr/local/bin/bundle:23:in `load'
> /usr/local/bin/bundle:23:in `<main>'
> Tasks: TOP => assets:precompile
> (See full trace by running task with --trace)
> 
> ```

Similar issues include:

- [Uglifier error during assets precompile](https://meta.discourse.org/t/uglifier-error-during-assets-precompile/96970)
- [ERROR: Unexpected token: punc «)» from qunit helper during a rebuild](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052)

> **Broken Theme Component**
>
> ```plaintext
> Updating 'Category Headers theme component' for 'default'...
> Updating 'Toggle Whisper' for 'default'...
> Updating 'Discourse Clickable Topic' for 'default'...
> Downloading MaxMindDB...
> Compressing Javascript and Generating Source Maps
> 
> I, [2021-12-20T13:14:25.975333 #1] INFO -- : Terminating async processes
> I, [2021-12-20T13:14:25.975386 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 32
> 32:signal-handler (1640006065) Received SIGTERM scheduling shutdown...
> 32:M 20 Dec 2021 13:14:26.048 # User requested shutdown...
> 32:M 20 Dec 2021 13:14:26.048 * Saving the final RDB snapshot before exiting.
> 32:M 20 Dec 2021 13:14:26.161 * DB saved on disk
> 32:M 20 Dec 2021 13:14:26.161 # Redis is now ready to exit, bye bye...
> 
> ```

Similar issue: [Error when "./discourse rebuild app" due to theme error](https://meta.discourse.org/t/error-when-discourse-rebuild-app-due-to-theme-error/210207)  
However this issue has the following line, which I couldn’t find any equivalents for in my discourse-doctor log.

```plaintext
Failed to update 'Alternative Logos': about.json contains invalid values: Maximum discourse version is invalid
rake aborted!

```

> **MaxMind**
>
> ```plaintext
> MaxMind IP database updates require a license
> Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com
> Compressing: vendor-e9ee842d7242168f7caf93b4baf7ca88f9a272c7febf7dc3def79d67a758d3c3.js
> MaxMind IP database updates require a license
> Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com
> rake aborted!
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/launcher-rebuild-app-failed-during-rake-themes-update-assets-precompile/212708)._
