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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login