1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Webpackerを使用したRailsアプリケーションのHerokuデプロイが失敗する

Posted at

今月初めにデプロイしたときは大丈夫だったのに。

remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        info fsevents@1.2.9: The platform "linux" is incompatible with this module.
remote:        info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning " > webpack-dev-server@3.5.1" has unmet peer dependency "webpack@^4.0.0".
remote:        warning "webpack-dev-server > webpack-dev-middleware@3.7.0" has unmet peer dependency "webpack@^4.0.0".
remote:        [4/4] Building fresh packages...
remote:        Done in 23.46s.
remote:        rake aborted!
remote:        NoMethodError: undefined method `+' for nil:NilClass
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/configuration.rb:31:in `additional_paths'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/configuration.rb:35:in `additional_paths_globbed'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/compiler.rb:93:in `default_watched_paths'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/compiler.rb:57:in `watched_files_digest'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/compiler.rb:38:in `fresh?'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/compiler.rb:43:in `stale?'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/compiler.rb:22:in `compile'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker/commands.rb:51:in `compile'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker.rb:35:in `compile'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/tasks/webpacker/compile.rake:23:in `block (4 levels) in <top (required)>'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker.rb:28:in `ensure_log_goes_to_stdout'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/tasks/webpacker/compile.rake:22:in `block (3 levels) in <top (required)>'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/webpacker.rb:20:in `with_node_env'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/bundler/gems/webpacker-22ab02b7c84e/lib/tasks/webpacker/compile.rake:21:in `block (2 levels) in <top (required)>'
remote:        /tmp/build_4930254058220dd8fc6c979c60005fdd/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => assets:precompile => webpacker:compile
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...

Webpackerの元ソースに変更があったみたい。

- with webpack modules, you can use the `resolved_paths`
+ with webpack modules, you can use the `additional_paths`

のとおり、webpacker.ymlのresolved_pathsをadditional_pathsに変更して通った。
全くソースは読み込めてないですが取り急ぎ。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?