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.

    Config.fs

    Scheduled Pinned Locked Moved Troubleshooting
    troubleshootconfigconfig.jsconfiguration
    22 Posts 4 Posters 8.4k Views 4 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.
    • lavolp3L Offline
      lavolp3 Module Developer @Guest
      last edited by

      @sean said in Config.fs:

      comma missed.

      A classic!

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

      1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User @scoller
        last edited by A Former User

        @scoller
        In {} (object) and [] (array), there could be several items. Each item should be separated by comma,. Only last item could omit ,.
        By example

        someObject: {
          someProperty: someValue ,
          anotherProperty: anotherValue ,
          lastProperty: lastValue
        }, //< - this object also could be an element of other list
        someArray: [
          someElement, 
          otherElement, 
          lastElement //< - you can omit comma here.
        ] // < - You can omit last comma of list.
        
        S 3 Replies Last reply Reply Quote 0
        • S Offline
          scoller @Guest
          last edited by

          @sean so you mean like {nothing,nothing}?

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @scoller
            last edited by

            @scoller right.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              scoller @Guest
              last edited by

              @sean but i mean where is the brackets where the comma should be. For an example high up or low down in the code

              ? 2 Replies Last reply Reply Quote 0
              • ? Offline
                A Former User @scoller
                last edited by A Former User

                @scoller Well, that is a just grammar of JavaScript. So…
                Hmmm…
                Just remember these.

                • Every bracket([], {}) should be closed somewhere.
                • Nested brackets should be matched their opening and closing.
                • All Items should be separated with comma
                • All text string should be quoted by quotation mark (`, " or ')
                • true/false (boolean value) and number should not be quoted.

                These are common rules for config.js

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  scoller @Guest
                  last edited by

                  @sean thank’s for the help will try that

                  1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User @scoller
                    last edited by

                    @scoller
                    You have two locationID: "2726470" in your code. both should be modified.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      scoller @Guest
                      last edited by

                      @sean Specific for my code can you point it out cause I can’t find it, may be because of my lack of knowledge :)

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        scoller @Guest
                        last edited by

                        @sean my code goes like this is this an error?
                        {.
                        Hdhdhdhdu
                        Hhdhdhfhdujd.
                        Hdhdhhdh
                        {
                        And the bracket never closes, is that an error?

                        ? 1 Reply Last reply Reply Quote 0
                        • ? Offline
                          A Former User @scoller
                          last edited by

                          @scoller

                          {
                            module: "currentweather",
                            position: "top_right",
                            config: {
                              location: "Alsike,Sweden",
                              locationID: "2726470", // < - I think here comma missed.
                              appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
                            }
                          },
                          {
                            module: "weatherforecast",
                            position: "top_right",
                            header: "Vädret i Framtiden",
                            config: {
                              location: "Alsike,Sweden",
                              locationID: "2726470", // < - Here also.
                              appid: "c17305e68b5d2b54d3f2c8b5e2cc4002"
                            }
                          },
                          
                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            scoller @Guest
                            last edited by

                            @sean What is that? I see its the code but what?

                            :::

                            ? 1 Reply Last reply Reply Quote 0
                            • ? Offline
                              A Former User @scoller
                              last edited by

                              @scoller
                              Exchange those with your current currentweather and weatherforecast in config.js

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                scoller @Guest
                                last edited by

                                @sean Thank you again. Is that the problem?

                                Mykle1M ? 2 Replies Last reply Reply Quote 0
                                • Mykle1M Offline
                                  Mykle1 Project Sponsor Module Developer @scoller
                                  last edited by

                                  @scoller

                                  https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners

                                  Create a working config
                                  How to add modules

                                  1 Reply Last reply Reply Quote 0
                                  • ? Offline
                                    A Former User @scoller
                                    last edited by

                                    @scoller
                                    You’ve missed comma after locationID: "2726470" so, just adding it would be enough, but you’d said you couldn’t find where they are, so I told you to exchange whole section.

                                    1 Reply Last reply Reply Quote 0

                                    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
                                    • 1
                                    • 2
                                    • 2 / 2
                                    • 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