Read the statement by Michael Teeuw here.
Can't edit compliments.js
-
I’ve been reading through the documentation from here https://docs.magicmirror.builders/modules/compliments.html#configuration-options
Each time I add this to the config it stops working I’m obviously missing something.
{ module: "compliments", position: "lower_third" config: { compliments: { anytime: [ "Hey Wren!" ], morning: [ "blah blah blah", "blah blah blah", "blah blah blah" ], afternoon: [ "blah blah blah", "Yblah blah blah", "blah blah blah" ], evening: [ "blah blah blah", "blah blah blah", "blah blah blah" ], "....-01-01": [ "Happy new year!" ] } } },
-
Hi @mayfield,
Most of the times, commas are missing (here at least after the line with the position). Use the builtin function to check if it is valid…I use a website where you can enter the whole content of your config.js:
https://esprima.org/demo/validate.htmlGreetings
Thomas -
-
@sdetweil I know:-)
-
@thgmirror typically ‘unexpected token’ means the line before was missing a trailing comma
-
@sdetweil said in Can't edit compliments.js:
@thgmirror the built-in checker is
from the MagicMirror folder do
npm run config:check
Yes this was going to be another question I wanted to ask as that doesn’t work on mine and I’m not sure why yet
I followed this site to flash a SD card https://github.com/guysoft/MagicMirrorOS
and when I run that I get this I guess I need to install that
-
ah mmos…
then u have to run the command inside the docker container where mm is installed -
@thgmirror said in Can't edit compliments.js:
Hi @mayfield,
Most of the times, commas are missing (here at least after the line with the position). Use the builtin function to check if it is valid…I use a website where you can enter the whole content of your config.js:
https://esprima.org/demo/validate.htmlGreetings
ThomasIt was a comma on the position line lol Its working again thanks for the tip
-
@sdetweil said in Can't edit compliments.js:
ah mmos…
then u have to run the command inside the docker container where mm is installedOK cheers I’ll do some reading and thanks everyone for the help much appreciated