Webpacker: JSON parse error

Created on 3 Mar 2019  路  2Comments  路  Source: rails/webpacker

Regarding the following error in bundle exec foreman start -f Procfile.dev
12:22:39 web.1 | from ...ruby-2.6.0/lib/ruby/2.6.0/json/common.rb:156:in 'parse': 767: unexpected token at '' (JSON::ParserError)
12:22:39 web.1 | from ...ruby-2.6.0/lib/ruby/2.6.0/json/common.rb:156:in 'parse'
12:22:39 web.1 | from ...ruby-2.6.0/gems/webpacker-4.0.0.rc.7/lib/webpacker/manifest.rb:84

Fix:
begin
JSON.parse config.public_manifest_path.read
rescue
{}
end

Most helpful comment

Did you try rails webpacker:compile?

All 2 comments

Did you try rails webpacker:compile?

Did you try rails webpacker:compile?

Yeah thank you. That's worked for me.

Was this page helpful?
0 / 5 - 0 ratings