Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    UNSOLVED Hi very beginners question here.

    Troubleshooting
    3
    6
    799
    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.
    • S
      steveuk last edited by

      Hi all.
      I’m very new to magic mirror.
      So I managed to get it running on the basic layout and thought I’d try my first module and with the simple dad jokes one.
      I have the folder showing in the modules folders and then 8 went to the main config.js file to enter the bit of code.

      var config = {
          modules: [
              {
                  module: 'MMM-Dad-Jokes',
                  position: 'bottom_left', // Or wherever you want
                  config: {
                      updateInterval: 60000,
                      fadeSpeed: 4000
                  }
              }
          ]
      }
      

      But it’s not working I’m getting a error when loading saying about not having a valid config file.
      I think I’m copying and pasting it in the wrong part or I’m copying too much of it.
      Could someone break it down for me with what I do with the above code on a fresh config file as I’m not actually sure where to do the curser click when I click paste is it after the last closed bracket ?
      Cheers

      S Mykle1 2 Replies Last reply Reply Quote 0
      • S
        sdetweil @steveuk last edited by sdetweil

        @steveuk it looks good… try running the checker

        npm run check:config
        

        from the MM folder

        u need all that upper stuff too, right?

          address: "", // Address to listen on, can be:
                                // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                // - another specific IPv4/6 to listen on a specific interface
                                // - "", "0.0.0.0", "::" to listen on any interface
                                // Default, when address config is left out, is "localhost"
          port: 8086,
          ipWhitelist: [], // Set [] to allow all IP addresses
                                   // or add a specific IPv4 of 192.168.1.5 :
                                   // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                   // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                  // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
        
          language:  "en", 
          timeFormat: 12,
          units: "imperial",
        
        S 1 Reply Last reply Reply Quote 0
        • S
          steveuk @sdetweil last edited by

          @sdetweil
          Hi thanks the reply yeah I have all the upper parts as normal.
          I deleted the file and tried again with a different module following YouTube and got it to work.
          I noticed some of these instructions on the module installation come with extra bits of text I don’t need to copy and paste in, I think I’m confusing myself with when I need the { } and },
          But like I say I did get a module to show up but in the config I put “bottom_right” but it shows on the top left.
          Thanks again.

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @steveuk last edited by sdetweil

            @steveuk a module entry will have at LEAST this

            {
                module: 'module_name',
                position: 'some_region_name',
                config: {
                    // module specific info
                }
            },
            

            see here for the region definitions
            https://forum.magicmirror.builders/topic/286/regions

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

              @steveuk said in Hi very beginners question here.:

              Could someone break it down for me with what I do with the above code on a fresh config file as I’m not actually sure where to do the curser click when I click paste is it after the last closed bracket ?

              It should look like this. Your entry was missing a comma after the last curly bracket.

              {
                          module: 'MMM-Dad-Jokes',
                          position: 'bottom_left', // Or wherever you want
                          config: {
                              updateInterval: 60000,
                              fadeSpeed: 4000
                          }
                      },
              

              This will help you understand the format of a config entry.

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

              S 1 Reply Last reply Reply Quote 1
              • S
                steveuk @Mykle1 last edited by

                @Mykle1 @sdetweil
                That’s great
                Thanks for the help guys.

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy