When deploying my Rails app on heroku I get the following error,
remote: Bundle completed (163.81s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v8.10.0-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install remote: rake aborted! remote: Uglifier::Error: Unexpected token punc «;», expected punc «,» remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:234:in `parse_result' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:216:in `run_uglifyjs' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:168:in `compile' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/compressing.rb:65:in `block in js_compressor=' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy_proc_processor.rb:31:in `call' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `blockin load' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define' remote: /tmp/build_eb48b48285b82dae89f9dfd764c51c22/vendor/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `' remote: Tasks: TOP => assets:precompile remote: (See full trace by running task with --trace) remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy...
I've already modify the line in production.rb
to,
config.assets.js_compressor = Uglifier.new(harmony: true)
but error persists.
block in irb_binding' from (irb):16:in
each' from (irb):16 – Isaac Brigido