Read the statement by Michael Teeuw here.
Config Error
-
@sdetweil yeah, so note to self for the future lol
so literally type “cd magic mirror” and that should fix it?
and also change my api key in the future, not in the config file, right? -
@PHAGE-GOV in the config file the apikey should be ok, only when u paste config to the forum should u blank it out…
linux is case sensitive, so its
cd MagicMirror
-
@sdetweil so i did the cd Magic Mirror and then ran pm2 start/mm.sh
and i got a pm2 error “script not found: home/pi/MagicMirror/mm.sh” -
@PHAGE-GOV use my pm2 setup script here
-
@sdetweil well i tried lol
[2020-05-20 17:25:02.499] [LOG] Starting MagicMirror: v2.11.0 [2020-05-20 17:25:02.506] [LOG] Loading config ... [2020-05-20 17:25:02.510] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:41 Welcome_message "string" ^^^^^^^^^^^^^^^ SyntaxError: Unexpected identifier at Module._compile (internal/modules/cjs/loader.js:722:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at loadConfig (/home/pi/MagicMirror/js/app.js:69:12) at App.start (/home/pi/MagicMirror/js/app.js:210:3) at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:115:7) at Module._compile (internal/modules/cjs/loader.js:786:30) [2020-05-20 17:25:02.511] [LOG] Loading module helpers ... [2020-05-20 17:25:02.555] [LOG] Initializing new module helper ... [2020-05-20 17:25:02.557] [LOG] Module helper loaded: updatenotification [2020-05-20 17:25:02.558] [LOG] No helper found for module: helloworld. [2020-05-20 17:25:02.559] [LOG] All module helpers loaded. [2020-05-20 17:25:02.680] [LOG] Starting server on port 8080 ... [2020-05-20 17:25:02.693] [LOG] Server started ... [2020-05-20 17:25:02.694] [LOG] Connecting socket for: updatenotification [2020-05-20 17:25:02.695] [LOG] Sockets connected & modules started ... [2020-05-20 17:25:02.785] [LOG] Launching application. [2020-05-20 17:25:24.052] [LOG] Shutting down server... [2020-05-20 17:25:24.053] [LOG] Stopping module helper: updatenotifica -
@PHAGE-GOV said in Config Error:
/home/pi/MagicMirror/config/config.js:41
Welcome_message “string”
^^^^^^^^^^^^^^^SyntaxError: Unexpected identifier
-
@sdetweil would it be a good idea at this point to just delete and reinstall lol
-
@sdetweil wait so how do i fix that line? like what would you recomend?
-
@PHAGE-GOV that is what you have to figure out… run the syntax checker
cd ~/MagicMirror npm run config:checkthe error is typically reported on the line following the error, but maybe not in this case.
read this
https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners?_=1589635889121you are asking for people to do the work for you, and not learning… time to learn
-
@sdetweil okay mom lmaoo, and yes, i agree
-
so sensei @sdetweil , i got this.
hecking file... /home/pi/MagicMirror/config/config.js Line 41 col 4 Parsing error: Unexpected token Welcome_messageso does that just mean i should delete that line altogether?
-
@sdetweil wait so it said the options were “string” and “false” for “welcome message” thats where its wrong, so i think its fixed?? ill update if it isnt fixed lol
-
@PHAGE-GOV said in Config Error:
so does that just mean i should delete that line altogether?
no idea… maybe it is an important line,
but as I said, the error is reported on the line after the actual problem
if u read the linked getting started
you would see that elements in config.js are
sometext : somevaluewhere somevalue MUST be quoted before and after (single or double doesn’t matter, as long as both ends are the same)
unless somevalue is true/false, or a numberAND you need to add a continuation char (comma ,) at the end to the line if the next line
is include in this info, or more info is comming (another module config for example) -
@sdetweil yeah ill try that, i tried fixing “string” because it had an extra space in it but i got the no config.js file again, i will try looking for the other stuff rn
-
@PHAGE-GOV said in Config Error:
in it but i got the no config.js file again,
if it has an error in the config, it throws up its hands and says no config…
yes there is one, but he can’t tell what to do -
@PHAGE-GOV I guess you have that part in the alert module.
It needs to be like @sdetweil said. on the left side a single word, here
welcome_message. You need to take care of underlines and the upper-/lowercase.
Then there is a:and then the value which can be a string or false.welcome_message: 'Any string you like'OR
welcome_message: false -
-
@sdetweil Looking at above post, there’s looots of errors in the config.
@PHAGE-GOV we can’t lead you through all of these.
You need to understand how config.js needs to look. Only one comma set false or forgotten breaks the whole file and the mirror. -
@lavolp3 The alert part needs to look like this:
{ module: "alert", position: "right", welcome_message: "a string" }, -
@sdetweil okay so ive been combing through the code, and since i didnt know how to properly edit .json files, i had alot of cleanup to do, im still not done, but getting there. what is a trailing space though? i dont know what to remove
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