Read the statement by Michael Teeuw here.
keep getting error after modifying config.js file
-
in your MagicMirror folder, run " npm run config:check" after modifying your config, it’ll point out any errors you’ve made so you can fix them…
-
@wazscience said in keep getting error after modifying config.js file:
position: “top_left”
position: “top_left”,u forgot the ( , ) at the end
-
As samson said you are missing a comma after
position
But it also likes like you are using a text editor that converts single quotes to smart quotes.
There is a difference between
“clock”
and"clock"
.
Use either the Nano text editor if you are working directly on the Pi, if you are working from another pc/mac change your text editor to one that doesn’t convert quotes to smart quotes (like atom, notepad+, sublime or similar)And, when the value of an variable is a number or true/false you don’t use any quotes at all.
So
{ module: "clock", position: "top_left", config: { timeFormat:12, ------------ Pure number, no quotes showPeriod:false, ------------ true or false, no quotes displayType:"both", analogSize:"400px" } },
-
wow. did not see this ^^.
Use nano or a remote desktop to edit your config.
-
@wazscience said in keep getting error after modifying config.js file:
whenever I try to modify the config.js file, either to add a module or to edit an existing one, I get an error message
You might want to give this a read. I went through the same thing as you.
https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners