Rebuild failing due to checklist plugin


(Thomas Purchas) #1

Hey everyone,

I just tried up update discourse and install the slack plugin and the rebuild is failing quite badly. The install is vanilla discourse with a couple of plugins (config below).

I’m getting the following error:

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 13510 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
e9a99e5dba8d3473f6228b8a83b801439f6d135a2d9f6a1d8bede9f1d52a9716
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Looking back through the logs, the error seems to start here:

I, [2017-07-06T16:35:08.560003 #13512]  INFO -- : Writing /var/www/discourse/public/assets/plugin-2ed10ab579c5c3e40860fe1c5b1faca7eb23204a1f193792a7937bfb0b7c503f.js
rake aborted!
MiniRacer::RuntimeError: SyntaxError: unknown: Only one default export allowed per module. (58:0)
JavaScript 56 | }
JavaScript 57 |
JavaScript > 58 | export default {
JavaScript | ^
JavaScript 59 |   name: 'checklist',
JavaScript 60 |   initialize: function(container)
JavaScript 61 |   {
JavaScript at Parser.pp$5.raise (<anonymous>:14315:14)
JavaScript at Parser.pp$1.raiseDuplicateExportError (<anonymous>:12680:9)
JavaScript at Parser.pp$1.checkDuplicateExports (<anonymous>:12674:11)
JavaScript at Parser.pp$1.checkExport (<anonymous>:12573:13)
JavaScript at Parser.pp$1.parseExport (<anonymous>:12510:11)
JavaScript at Parser.pp$1.parseStatement (<anonymous>:11745:75)
JavaScript at Parser.pp$1.parseBlockBody (<anonymous>:12129:22)
JavaScript at Parser.pp$1.parseTopLevel (<anonymous>:11639:9)
JavaScript at Parser.parse (<anonymous>:11534:18)
JavaScript at parse (<anonymous>:17082:38)
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:168:in `eval_unsafe'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:168:in `block (2 levels) in eval'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:239:in `timeout'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:167:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `block in with_lock'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `with_lock'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:165:in `eval'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:118:in `block in evaluate'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:71:in `block in protect'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:70:in `synchronize'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:70:in `protect'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:116:in `evaluate'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/tilt-2.0.7/lib/tilt/template.rb:109:in `render'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/utils.rb:200:in `dfs'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in `find'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
158:signal-handler (1499358908) Received SIGTERM scheduling shutdown...
I, [2017-07-06T16:35:08.765317 #16]  INFO -- : Purging temp files
Bundling assets

I, [2017-07-06T16:35:08.765651 #16]  INFO -- : Terminating async processes
I, [2017-07-06T16:35:08.765742 #16]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 45
I, [2017-07-06T16:35:08.765837 #16]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 158
2017-07-06 16:35:08.765 UTC [45] LOG:  received fast shutdown request
2017-07-06 16:35:08.765 UTC [45] LOG:  aborting any active transactions
2017-07-06 16:35:08.766 UTC [52] LOG:  autovacuum launcher shutting down
2017-07-06 16:35:08.768 UTC [49] LOG:  shutting down
2017-07-06 16:35:08.779 UTC [49] LOG:  database system is shut down
158:M 06 Jul 16:35:08.816 # User requested shutdown...
158:M 06 Jul 16:35:08.816 * Saving the final RDB snapshot before exiting.
158:M 06 Jul 16:35:08.903 * DB saved on disk
158:M 06 Jul 16:35:08.903 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 13510 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
e9a99e5dba8d3473f6228b8a83b801439f6d135a2d9f6a1d8bede9f1d52a9716
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Our config is standard with these plugins

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-push-notifications.git
          - git clone https://github.com/cpradio/discourse-plugin-checklist.git
          - git clone https://github.com/discourse/discourse-slack-official.git

Anyone have any ideas?


(Thomas Purchas) #2

After digging through the logs, and the different plugins I tracked the error down to the checklists plugin by @cpradio. The build process seems to be taking issue with this line of JS in the plugin:

I’ve taken the plugin out, and builds just fine now.


(cpradio) #4

This is now resolved


(David Taylor) #5

I’m getting a similar issue when trying to upgrade my forum. @cpradio do you know if something changed in core to cause the issue? I have quite a few plugins installed, so I suspect one of them needs to make similar changes.

Edit: Upgraded discourse-solved to latest and all is now fine - we really need an “update all” button in docker_manager :thinking:.


(Joshua Rosenfeld) #6

This has come up before: