jekyll-minifier icon indicating copy to clipboard operation
jekyll-minifier copied to clipboard

Unexpected token errors

Open malford89 opened this issue 7 years ago • 5 comments

Hello I am making a website using Jekyll and Foundation 6. After install I got an error that I am unable to make sense of. Can you explain to me what is happening in the console after I did jekyll serve. Here is my error: `jekyll 3.4.2 | Error: Unexpected token: name (Abide) (line: 10, col: 6, pos: 91)

Error at new JS_Parse_Error (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:11936) at js_error (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:12155) at croak (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:20622) at token_error (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:20759) at unexpected (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:20847) at semicolon (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:21320) at simple_statement (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:24179) at /private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:22152 at /private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:21493 at block_ (/private/var/folders/x1/qjqh58fs0kjdspmhldlvvzf80000gn/T/execjs20170417-27073-x7pzazjs:2659:26198)`

malford89 avatar Apr 17 '17 16:04 malford89

I'm having the same problem. I got:

jekyll 3.4.3 | Error:  Unexpected token: punc ()) (line: 152, col: 1, pos: 3508)

I was able to laboriously guess and check which file it came from, but it would be super helpful if you added the filename to the output.

ellisonch avatar Jun 08 '17 09:06 ellisonch

Thanks for your reports, I'll look into these errors and try to get them resolved.

digitalsparky avatar Jun 08 '17 10:06 digitalsparky

@malford89 @ellisonch @digitalsparky

I got this error when I used let vs. var for my variables. The minified didn't like let so I changed everything back to var and it fixed my issue.

johnchourajr avatar Sep 06 '17 19:09 johnchourajr

I'm also receiving this issue, as well as problems with arrow functions and back-quote string interpolation. Seems the minifier doesn't like ES6 syntax.

rbuchberger avatar Nov 13 '18 17:11 rbuchberger

I'm having this issue too... 😭

z3nth10n avatar Mar 13 '19 04:03 z3nth10n