rspivak / slimit

SlimIt - a JavaScript minifier/parser in Python
MIT License
550 stars 94 forks source link

Unexpected token (SEMI, ';') at... #78

Open redyyu opened 9 years ago

redyyu commented 9 years ago

I had same issus

screen shot 2015-07-10 at 5 57 59 am

the file is a angularjs file upload's lib. and it's work fine when using Nodejs's minify (grunt plugin).

I believe it is slimit's bug.

redyyu commented 9 years ago

sorry it's must be happened when minify angular-material.js another lib I shouldn't modify too.

screen shot 2015-07-10 at 6 19 59 am

ghost commented 7 years ago

I'm getting the same error with another js library and I have no idea how to fix it. There is no semicolon in the relevant code portion:

SyntaxError: Unexpected token (SEMI, ';') at 40874:1412223 between LexToken(LINE_TERMINATOR,'\n',40873,1412210) and LexToken(NEW,'new',40874,1412223)
            old: new ig.RGBColor(),
            new: new ig.RGBColor()
        },
borderColor: {
metatoaster commented 6 years ago

The cause is due to the exact same issue already reported as #52, #59, #81, and #90.

ghost commented 6 years ago

Ah. I see.

metatoaster commented 6 years ago

@22459 if you are still working on this problem and still want to keep using Python tools, I have forked slimit and rebuilt it as calmjs.parse, with a CLI utility called crimp which is built on top of that.