Read the statement by Michael Teeuw here.
Unexpected token error
-
Hi, whenever I do a config check through npm, I get an error saying “Line 127 column 2: Parsing error: Unexpected token ;”. When I go to check where this line is, it is at the end of the config, which has this
height: "720" , width: "1200" , quality: "100" , displayResult: "true" , device: "null" , shootMessage: "Smile!" , displayCountdown: "true" , displayResult: "true" , resultDuration: "500 * 5" , } } ], };
Any help would be appreciated.
-
@zalgo 99% of the time Unexpected token means the line before the reported line is missing a trailing comma.
I don’t see that here. but you have other problems
the javascript rules are
the thing the left of : does not need quotes, unless it contains a non-alpha character
the thing to the right does NOT need quotes IF it is a number, an formula w numbers, or true or false , OR its a structure start { or array start [,otherwise it does need quotes
your “500 * 5” is a formula and js will calculate that
-
@zalgo because the error is end of file, it means it is confused.
look at the config.js.sample