Debug JS Comple Errors on Heroku

by Jess Brown

ExecJS::RuntimeError: SyntaxError: Unexpected token punc «,», expected punc «:» (line: 1559, col: 7, pos: 56557)

Recently ran into this issue on Heroku and found a a great answer on Stack Overflow I wanted to share how it works:

Here's the link to the Stack Overflow article:

https://stackoverflow.com/a/38605526

Here's the one liner:

JS_PATH = "app/assets/javascripts/**/*.js"; Dir[JS_PATH].each{|file_name| puts "\n#{file_name}"; puts Uglifier.compile(File.read(file_name)) }

comments powered by Disqus