umts / ft-forms

Rails app for authenticated users to submit requests to Transit's field trip department.
https://ft-forms.admin.umass.edu/
MIT License
0 stars 2 forks source link

Ask Uglifyer to try minifying ES6 #105

Closed werebus closed 5 years ago

werebus commented 5 years ago

Cannot deploy master currently because of:

Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/uglifier-4.1.20/lib/uglifier.rb:234:in `parse_result'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/uglifier-4.1.20/lib/uglifier.rb:216:in `run_uglifyjs'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/uglifier-4.1.20/lib/uglifier.rb:168:in `compile'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/srv/ft-forms/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/opt/ruby/bin/bundle:23:in `load'
/opt/ruby/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile

"Harmony" mode is "experimental", but the alternatives are...more difficult. We could also try to use Babel to compile JS into ES5 first, or use closure-compiler which requires Java on the production server.

I also twiddled a few other asset-adjacent settings, and fixed a 404.

werebus commented 5 years ago

FWIW, #99 hasn't been deployed yet. @Anbranin, perhaps you should do the honors? Not that I think it will break, but....

Anbranin commented 5 years ago

:-o I did it. No one uses the form builder on that site anyways. :/