• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Can't edit compliments.js

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 3 Posters 2.5k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mayfield
    last edited by Apr 30, 2021, 12:20 PM

    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!"
                    ]
            }
    }
                    },
    
    T 1 Reply Last reply Apr 30, 2021, 12:27 PM Reply Quote 0
    • T Offline
      thgmirror @mayfield
      last edited by thgmirror Apr 30, 2021, 12:28 PM Apr 30, 2021, 12:27 PM

      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.html

      Greetings
      Thomas

      S M 2 Replies Last reply Apr 30, 2021, 12:33 PM Reply Quote 0
      • S Offline
        sdetweil @thgmirror
        last edited by Apr 30, 2021, 12:33 PM

        @thgmirror the built-in checker is

        from the MagicMirror folder do

        npm run config:check
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        T M 2 Replies Last reply Apr 30, 2021, 12:39 PM Reply Quote 0
        • T Offline
          thgmirror @sdetweil
          last edited by Apr 30, 2021, 12:39 PM

          @sdetweil I know:-)

          S 1 Reply Last reply Apr 30, 2021, 12:41 PM Reply Quote 0
          • S Offline
            sdetweil @thgmirror
            last edited by Apr 30, 2021, 12:41 PM

            @thgmirror typically ‘unexpected token’ means the line before was missing a trailing comma

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              mayfield @sdetweil
              last edited by Apr 30, 2021, 12:41 PM

              @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
              alt text

              S 1 Reply Last reply Apr 30, 2021, 12:45 PM Reply Quote 0
              • S Offline
                sdetweil @mayfield
                last edited by sdetweil Apr 30, 2021, 12:47 PM Apr 30, 2021, 12:45 PM

                @mayfield

                ah mmos…
                then u have to run the command inside the docker container where mm is installed

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Apr 30, 2021, 1:12 PM Reply Quote 0
                • M Offline
                  mayfield @thgmirror
                  last edited by Apr 30, 2021, 1:08 PM

                  @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.html

                  Greetings
                  Thomas

                  It was a comma on the position line lol Its working again thanks for the tip

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mayfield @sdetweil
                    last edited by Apr 30, 2021, 1:12 PM

                    @sdetweil said in Can't edit compliments.js:

                    @mayfield

                    ah mmos…
                    then u have to run the command inside the docker container where mm is installed

                    OK cheers I’ll do some reading and thanks everyone for the help much appreciated

                    1 Reply Last reply Reply Quote 0
                    • 1
                    • 2
                    • 1 / 2
                    1 / 2
                    • First post
                      8/12
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy