You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to precompile assets with config.assets.js_compressor = Uglifier.new(harmony: true) and I receive the error Uglifier::Error: Unexpected token: punc (.) for JS syntax like this: .data('id'))?.advanced_settings
Full Stacktrace:
/mypath/app/assets/config/manifest.js:2
/usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:291:in parse_result' /usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:221:in run_uglifyjs'
/usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:166:in compile' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/compressing.rb:65:in block in js_compressor='
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/legacy_proc_processor.rb:31:in call' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:388:in load'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:357:in block in link_paths' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:367:in block in resolve_paths'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:363:in each' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:363:in resolve_paths'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:356:in link_paths' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:317:in process_link_directory_directive'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:180:in block in process_directives' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in each'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in process_directives' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:83:in _call'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:68:in call' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in block in call'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in dfs' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in call'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in call_processor' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in block in call_processors'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in reverse_each' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in call_processors'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in load_from_unloaded' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in block in load'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in load'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in block in initialize' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in load'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in find_asset' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in find_all_linked_assets'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in block in find' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in each'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in find' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in compile'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in block (3 levels) in define' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in with_logger'
/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in block (2 levels) in define' /usr/local/rvm/gems/ruby-2.5.1/gems/rake-13.0.1/exe/rake:27:in <top (required)>'
/usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in eval' /usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in
'
Tasks: TOP => assets:precompile
Let me know if I can provide any additional context or if this has already been fixed elsewhere.
The text was updated successfully, but these errors were encountered:
Hi There
I am trying to precompile assets with
config.assets.js_compressor = Uglifier.new(harmony: true)
and I receive the errorUglifier::Error: Unexpected token: punc (.)
for JS syntax like this:.data('id'))?.advanced_settings
Full Stacktrace:
/mypath/app/assets/config/manifest.js:2
'/usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:291:in
parse_result' /usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:221:in
run_uglifyjs'/usr/local/rvm/gems/ruby-2.5.1/gems/uglifier-4.2.0/lib/uglifier.rb:166:in
compile' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/compressing.rb:65:in
block in js_compressor='/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/legacy_proc_processor.rb:31:in
call' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
call_processor'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in
block in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
reverse_each'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
load_from_unloaded'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in
block in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in
load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
block in initialize'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in
load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:388:in
load'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:357:in
block in link_paths' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:367:in
block in resolve_paths'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:363:in
each' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:363:in
resolve_paths'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:356:in
link_paths' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:317:in
process_link_directory_directive'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:180:in
block in process_directives' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in
each'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in
process_directives' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:83:in
_call'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:68:in
call' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
call_processor'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in
block in call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
reverse_each'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
call_processors' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
load_from_unloaded'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in
block in load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in
load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
block in initialize'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in
load' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in
block in call'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in
dfs' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in
call'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in
call_processor' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in
block in call_processors'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
reverse_each' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in
call_processors'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in
load_from_unloaded' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in
block in load'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in
load'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in
block in initialize' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in
load'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in
find_asset' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in
find_all_linked_assets'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in
block in find' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in
each'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in
find' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in
compile'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in
block (3 levels) in define' /usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in
with_logger'/usr/local/rvm/gems/ruby-2.5.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in
block (2 levels) in define' /usr/local/rvm/gems/ruby-2.5.1/gems/rake-13.0.1/exe/rake:27:in
<top (required)>'/usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in
eval' /usr/local/rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in
Tasks: TOP => assets:precompile
Let me know if I can provide any additional context or if this has already been fixed elsewhere.
The text was updated successfully, but these errors were encountered: