Read the statement by Michael Teeuw here.
Changing compliments
-
@KC5RIL > Unexpected identifier
90% of the time this means a comma missing on the line above
-
@sdetweil Stand by, ya’ll. I’m proofing now. Just caught a misplaced comma.
-
@KC5RIL npm config:check can show these errors.
has a bug in 2.12, temp fix posted to the top of the troubleshooting section
-
@Mykle1 Here’s the code. Figured this seemed like a popular spot to wet my feet. If I could get through this, I could set the rest up.
{ module: "compliments", position: "lower_third" config: { compliments: { "....-01-01": [ "Happy New Year!" ], "....-01-07": [ "Happy Birthday, Matt!" ], "....-01-08": [ "Hail to the King, Baby!", "I'm all shook up!", "You ain't nuthin' but a hound dog!" ], "....-01-25": [ "yaD etisoppO yppaH" ], "2021-02-02": [ "It's Groundhog Day \nAgain!" ], "....-02-14": [ "Happy Valentine's Day!" ], "2021-02-16": [ "Laissez les bon temps rouler!" ], "....-03-14": [ "Time for Pi!" ], "2021-03-17": [ "Erin Go Bragh!", "Kiss Me! \nI'm Irish" ], "....-04-01": [ "Your shoes are untied.", "Made you look.", "April Fools!" ], "2021-04-04": [ "Happy Easter!", "Rejoice!", "He is Risen!" ], "....-05-04": [ "May the Fourth be with you!" ], "....-05-06": [ "Revenge of the Sixth!" ], "....-05-09": [ "Happy Mother's Day!" ], "....-05-25": [ "Don't forget your towel.", "42!" ], "2021-05-31": [ "Happy Memorial Day!" ], "2021-06-20": [ "Happy Father's Day!" ], "....-07-04": [ "Celebrate your Independence!", "Freedom!", "Happy Fourth of July!" ], "....-07-09": [ "Happy Birthday, Noodle!" ], "....-08-14": [ "Happy Anniversary!" ], "2021-09-06": [ "Happy Labor Day!" ], "....-09-11": [ "Never Forget.", "Some gave all", "343/61", "Let's Roll!" ], "...-10-..": [ "Boo!" ], "....-11-16": [ "Happy Birthday, Susanne!" ], "2021-11-25": [ "Gobble! Gobble!", "Happy Thanksgiving!" ], "....-12-07": [ "A day that will live in infamy!" ], "....-12-23": [ "Time to air our grievances!", "Festivus for the rest of us!" ], "....-12-25": [ "Merry Christmas, Charlie Brown!", "Rejoice!", "Christ the Savior is born!" ], anytime: { "Hey!", "Hello.", "Whaddup Dog?", "Dude!", "Hej!", "You stay classy!" ], morning: [ "Good Morning!", "Smile \nIt's a beautiful day!", "Rise and Shine!", "Wakey Wakey! \nEggs & Baky!", "Coffee is ready!" ], afternoon: [ "Is it beer-thirty, yet?", "What a wonderful day!" ], evening: [ "Good Evening." ] } },
While ya’ll are looking at that, I’ll check the troubleshooting section. Thanks
-
position: "lower_third" config: {
why did I say?
comma missing on the line before the errorposition: "lower_third", // < ----- config: {
-
Okay! It’s coming together for me. I’m catching a couple more syntax errors. I’ll keep proofing to see if I catch more.
-
@KC5RIL general rules for the value to the right of :
numbers and true/false, no quotes,
otherwise needs quotes, doesn’t matter which as long as they are matched.be careful on quotes, these curly ones " ’
are no good, but these text mode are
ok"'
also if the next line starts with a word, then this line needs a trailing comma
-
@sdetweil I’ve proofed all I can. I don’t see anymore syntax errors. Still won’t run properly. Here’s the config:check ```
pi@WALL-e:~/MagicMirror $ npm run config:checkmagicmirror@2.12.0 config:check /home/pi/MagicMirror
node js/check_config.js[2020-08-19 21:11:52.797] [INFO] Checking file… /home/pi/MagicMirror/config/config.js
[2020-08-19 21:11:52.858] [LOG] Line 194 col 3 Parsing error: Unexpected token {
/home/pi/MagicMirror/js/check_config.js:66
throw new Error(“Wrong syntax in config file!”);
^Error: Wrong syntax in config file!
at /home/pi/MagicMirror/js/check_config.js:66:10
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! magicmirror@2.12.0 config:check:node js/check_config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the magicmirror@2.12.0 config:check script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-08-20T02_11_52_899Z-debug.log -
EUREKA!
The error message at start was bothering me. Figured it out with some playing around. needed a ‘}’ at 195. Problem solved.
Thanks for ya’lls help. I’ll more than likely pester you again with more issues. Have your crayons ready!
-