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.