Read the statement by Michael Teeuw here.
Syntax Error Unexpected Token
-
HELP !! I cannot seem to be able to fix this. I updated a module and got an error message. when I run npm run config:check, it say:
[14.04.2023 20:29.56.895] [INFO] Checking file… /home/ktodd32/MagicMirror/config/config.js
[14.04.2023 20:29.56.924] [ERROR] Your configuration file contains syntax errors :(
[14.04.2023 20:29.56.924] [ERROR] Line 16 column 6: Parsing error: Unexpected token :I looked at line 16 column 6 in the config file, but still not able to fix it. This is what is there.
port: 8080magicmirror: 2.21.0
npm: 8.19.3
node: 16.19.1Thanks for any help.
-
@kizzytodd the parser keeps going until it finds an obvious error. the cause might be sooner
in general, unexpected token, means the line before the line reported is missing a trailing comma
there are other more complicated causes but the trailing comma is the problem 95% of the time -
@kizzytodd said in Syntax Error Unexpected Token:
port: 8080
that line will cause a problem too, no trailing comma
-
@sdetweil Thanks for your feedback. I will check that out and let you know if I am able to resolve.
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