herokuへのデプロイでハマって参考にした記事

最初に見た記事

https://qiita.com/luglio22/items/cbf989e109cb1d6db1e8

Rubyの別バージョンをインスタール

https://qiita.com/_am_/items/c1dbeb11f40bbbac8fd9

バンドラーのバージョン変更

https://qiita.com/MotohiroSiobara/items/c0d343a160cffc2902ef

helokuのログを確認したところ、下記で最終的に解決

https://stackoverflow.com/questions/56063066/es6-syntax-harmony-mode-must-be-enabled-with-uglifier-newharmony-true

【追記】別のアプリデプロイ時に下記で解決

https://stackoverflow.com/questions/41783099/heroku-push-rejected-require-tree-argument-must-be-a-directory

エラー内容

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Yarn executable was not detected in the system.
       Download Yarn at https://yarnpkg.com/en/docs/install
       rake aborted!
       Sprockets::ArgumentError: require_tree argument must be a directory
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/app/assets/javascripts/cable.js:6
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:379:in `expand_relative_dirname'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:244:in `process_require_tree_directive'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:180:in `block in process_directives'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in `each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in `process_directives'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:83:in `_call'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:68:in `call'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
       /tmp/build_5924f7d00624b9b5e8e9e4ab45825e5c/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/exe/rake:27:in `'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed