[SOLVED] 1.4 RC3: error compiling webpacker assets

I thought it was time to tryout building 1.4 RC3 (actually commit 9afd7da, cause of a for my locale critical bug fix).

I run Mastodon using Docker (17.03.1-ce, build c6d412e) on a up-to-date Debian 8. My git files are owned by user ‘todon’ and live in /home/todon/live. I have no problems with building and running 1.3.3.

Before I started I did as root ‘chown -R 991:991 /home/todon/live/public/system’.

‘docker-compose build’ is successful.

But ‘docker-compose run --rm web rails assets:precompile’ fails. Everything goes well, until or after it tries to compile the ‘webpacker assets’. This is output:

[...]
Webpacker is installed 🎉 🍰
Using /mastodon/config/webpack/paths.yml file for setting up webpack paths
Compiling webpacker assets 🎉
rails aborted!
JSON::ParserError: 743: unexpected token at 'Webpack Bundle Analyzer saved stats file to /mastodon/public/packs/stats.json
Webpack Bundle Analyzer saved report to /mastodon/public/packs/report.html
'
/mastodon/vendor/bundle/ruby/2.4.0/gems/webpacker-1.2/lib/tasks/webpacker/compile.rake:13:in `block (2 levels) in <top (required)>'
/mastodon/vendor/bundle/ruby/2.4.0/gems/webpacker-1.2/lib/tasks/webpacker/compile.rake:40:in `block in <top (required)>'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/mastodon/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/commands.rb:18:in `<top (required)>'
/mastodon/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/mastodon/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `block in require'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:259:in `load_dependency'
/mastodon/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => webpacker:compile
(See full trace by running task with --trace)

What can be the problem?

Maybe related to this issue:

https://github.com/tootsuite/mastodon/issues/3251

Eventually opened a GitHib issue:
https://github.com/tootsuite/mastodon/issues/3304

Found it! This is related to another issue (#2922), about app/assets/stylesheets/custom.scss. When I remove that file, it works. In the above issue there is nothing about the errors I received, but I suppose this pull request will solve it.

I don’t add [SOLVED] yet to this thread, cause it is not really solved, but the solution is there :wink:

FYI: This comment solved it and I’m running 1.4RC4 now.