# ERREUR : Jeton inattendu : punc «)» du helper qunit lors d'une reconstruction

**URL:** https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052
**Category:** Support
**Created:** [Mai 11, 2021, 1:57 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052 "2021-05-11T13:57:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![space1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/space1/32/220304_2.png) [@space1](https://meta.discourse.org/u/space1)
#### Post date: [Mai 11, 2021, 1:57 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052/1 "2021-05-11T13:57:42Z")

</div>

PSA : Je suis en cours de mise à niveau de Discourse. Je pense que le processus est bloqué car il n’y a plus de progression et une trace de pile (stacktrace) s’affiche.

```
Done compressing google-tag-manager-207e4e7db708ead224f0e2ee6d92492abfe9a29e717480b6f6f2614fa7873019.js : 0.92 secs

8000037.063928327 Compressing: discourse/tests/theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js
uglifyjs '/var/www/discourse/public/assets/discourse/tests/_theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js' -m -c -o '/var/www/discourse/public/assets/discourse/tests/theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js' --source-map "base='/var/www/discourse/public/assets/discourse/tests',root='/assets/discourse/tests',url='/assets/discourse/tests/theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js.map'"
Parse error at _theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js:27884,17
define("sinon", () => {
                 ^
ERROR: Unexpected token: punc «)»
    at JS_Parse_Error.get (eval at <anonymous> (/usr/lib/node_modules/uglify-js/tools/node.js:18:1), <anonymous>:71:23)
    at fatal (/usr/lib/node_modules/uglify-js/bin/uglifyjs:409:27)
    at run (/usr/lib/node_modules/uglify-js/bin/uglifyjs:347:9)
    at Object.<anonymous> (/usr/lib/node_modules/uglify-js/bin/uglifyjs:261:5)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
rake aborted!
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/www/discourse/public/assets/discourse/tests/theme_qunit_helper-db34688652a3fe6992c7a007ef9754196ce9b6897556f2690c93410e88955814.js
/var/www/discourse/lib/tasks/assets.rake:290:in `size'
/var/www/discourse/lib/tasks/assets.rake:290:in `block (4 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `block in concurrent?'
/var/www/discourse/lib/tasks/assets.rake:281:in `block (3 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:272:in `each'
/var/www/discourse/lib/tasks/assets.rake:272:in `block (2 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `concurrent?'
/var/www/discourse/lib/tasks/assets.rake:269:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/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)
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:196:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:104:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/commands/runner/runner_command.rb:42:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command/base.rb:69:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/command.rb:46:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.3/lib/rails/commands.rb:18:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
bin/rails:17:in `<main>'
Spinning up 3 Unicorn worker(s) that were stopped initially

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [Mai 11, 2021, 7:17 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052/2 "2021-05-11T19:17:18Z")

</div>

Je ne sais pas si c’est une erreur dans un composant de thème qui en est la cause (et qui devrait l’être) ou s’il y a un autre problème lié aux tests de thème qunit. J’ai modifié le titre dans l’espoir que quelqu’un qui connaît ces tests qunit le remarque.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [Mai 11, 2021, 7:18 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052/3 "2021-05-11T19:18:23Z")

</div>

> [@space1](#):
>
> `uglifyjs`

Nous n’utilisons plus uglify. Lors d’une reconstruction, vous devriez être invité à mettre à jour l’image de base, ce qui résoudra ce problème.

Pourriez-vous réessayer avec :

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

?

---

<div class="post-metadata">

### Author: ![space1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/space1/32/220304_2.png) [@space1](https://meta.discourse.org/u/space1)
#### Post date: [Mai 12, 2021, 6:50 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052/4 "2021-05-12T06:50:10Z")

</div>

La mise à jour via l’interface de ligne de commande a fonctionné.  
Ce fil de discussion sert uniquement de rapport de bug. Je vais bien maintenant et j’ai à nouveau un Discourse fonctionnel. Merci.  
À l’avenir, je ne mettrai plus à jour via l’interface web.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [Mai 23, 2021, 6:40 UTC](https://meta.discourse.org/t/error-unexpected-token-punc-from-qunit-helper-during-a-rebuild/190052/5 "2021-05-23T18:40:13Z")

</div>

Juste une remarque : j’ai rencontré le même problème sur mon site auto-hébergé (exécutant deux conteneurs).

`./launcher rebuild app` exécute automatiquement un `git pull`, mais `./launcher bootstrap web_only` ne le fait pas. Je voulais simplement confirmer que l’exécution de `git pull` sous `/var/discourse` fonctionne comme prévu.
