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.

    MMM-Lunartic

    Scheduled Pinned Locked Moved Education
    266 Posts 30 Posters 428.7k Views 29 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer @thetalentedfool
      last edited by

      @thetalentedfool you can put your config here so we can have a look

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @thetalentedfool
        last edited by Mykle1

        @thetalentedfool said in MMM-Lunartic:

        I don’t think this is the source of my problems, but it seems maybe unintentional.)

        It’s not, but thank you for bringing that to my attention.

        The problem is/was completely my fault. In a recent update to the repo, specifically the README file, I failed to place a comma at the end of the image: "animation" line of the config entry. I’ve updated the repo and apologize for the error. Your config entry should now look like this:

        {
                module: 'MMM-Lunartic',
                position: 'top_left',                   // Best in left, center, or right regions
                config: { 
        		image: "animation",                     // animation, current or static
        		distance: "miles",                      // miles or km
        		useHeader: false,                       // true if you want a header
        		header: "The Lunartic is in my head",   // Any text you want
        		maxWidth: "300px",
        		animationSpeed: 3000,                   // updated info fades in and out
                }
            },
        

        If you have any further problems or questions, don’t hesitate to post for assistance. Thanks!

        Peace

        Create a working config
        How to add modules

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          thetalentedfool @Mykle1
          last edited by

          @Mykle1 D’oh! Can’t believe I missed that too - my kingdom for an actual helpful nodejs debug message with pointers to the offending line. Works great now. Thanks for the response!

          Mykle1M 3 Replies Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @thetalentedfool
            last edited by

            @thetalentedfool

            No, thank you. Just a stupid mistake on my part.

            MM has a command that will check your config and point out the errors but that command escapes me. I’ll take a look for it. Otherwise, jshint.com and jslint.com are pretty useful when I remember to actually USE them. :-)

            Cheers

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @thetalentedfool
              last edited by

              @thetalentedfool

              Found it! Here is the command that will check your config if you get that error at launch. I assume you need to run it in the MagicMirror directory
              npm run config:check

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @thetalentedfool
                last edited by

                @thetalentedfool

                I removed the comma from the config and ran npm run config:check. The result would be enough to determine the cause.

                daddle@daddle-Presario-CQ57-Notebook-PC:~/MagicMirror$ npm run config:check
                
                > magicmirror@2.1.3 config:check /home/daddle/MagicMirror
                > node tests/configs/check_config.js
                
                Checking file...  /home/daddle/MagicMirror/config/config.js
                Line 30 col 9 Expected '}' to match '{' from line 28 and instead saw 'distance'.
                Line 30 col 17 Expected '}' to match '{' from line 25 and instead saw ':'.
                Line 30 col 19 Expected ']' to match '[' from line 24 and instead saw 'miles'.
                Line 35 col 6 Missing semicolon.
                Line 35 col 5 Unrecoverable syntax error. (55% scanned).
                daddle@daddle-Presario-CQ57-Notebook-PC:~/MagicMirror$ 
                

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • lavolp3L Offline
                  lavolp3 Module Developer
                  last edited by

                  I’m astonished by the fact that “npm run config:check” seems to be so unknown in the community. It is a VERY important tool in my opinion.
                  Whenever there is something odd, always run this one first to check if the config is ok.
                  However, it took me about twenty lookups into the github readme to finally remember it correctly.

                  How to troubleshoot modules
                  MMM-soccer v2, MMM-AVStock

                  Mykle1M 1 Reply Last reply Reply Quote 1
                  • T Offline
                    thetalentedfool
                    last edited by

                    The terrible thing is that this command was exactly what I spent most of the afternoon yesterday looking for, and it’s apparently nowhere in the popular search results for debugging MM. (Git readme? Pffffft. Clearly my brain was not in a “RTactualFM” mood…lesson learned.) I’ll totally be preaching it now. Thanks for the info and demonstration!

                    Mykle1M 1 Reply Last reply Reply Quote 1
                    • Mykle1M Offline
                      Mykle1 Project Sponsor Module Developer @lavolp3
                      last edited by

                      @lavolp3 said in MMM-Lunartic:

                      I’m astonished by the fact that “npm run config:check” seems to be so unknown in the community. It is a VERY important tool in my opinion.

                      Well, it is a relatively new function, introduced in the last update to MM (I think). I had to look for the command because I don’t use it usually. However, I agree that it is a valuable tool

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 0
                      • Mykle1M Offline
                        Mykle1 Project Sponsor Module Developer @thetalentedfool
                        last edited by

                        @thetalentedfool said in MMM-Lunartic:

                        it’s apparently nowhere in the popular search results for debugging MM.

                        I’ll write up a simple tutorial and post it so that it is easier to find using the forum search function.

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 2
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 26
                        • 27
                        • 2 / 27
                        • First post
                          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