How do I debug Uglify parse errors?

1.4k Views Asked by At

I'm uglifying a JS file and just started getting

DEBUG: { message: 'Unexpected token: name (a)',
  line: 1,
  col: 17726,
  pos: 17726

What are the debugging steps I need to follow to track this down?

Needless to say, I've tried the obvious stuff like searching for "name" and "(a)", neither of which appear in the file. It would also be helpful to see what "line:1 col: 17726" are referring to since my input file is beautiful JS.

1

There are 1 best solutions below

0
On

Turns out the problem was the final line of one of the files didn't end with a CR. Thus, it and the first line on the following file were being concatenated into a single line.