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 Error

    Scheduled Pinned Locked Moved Troubleshooting
    newcodeerror
    39 Posts 5 Posters 13.5k Views 5 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.
    • P Offline
      PHAGE.GOV @sdetweil
      last edited by

      @sdetweil would it be a good idea at this point to just delete and reinstall lol

      1 Reply Last reply Reply Quote 0
      • P Offline
        PHAGE.GOV @sdetweil
        last edited by

        @sdetweil wait so how do i fix that line? like what would you recomend?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @PHAGE.GOV
          last edited by

          @PHAGE-GOV that is what you have to figure out… run the syntax checker

          cd ~/MagicMirror
          npm run config:check
          

          the error is typically reported on the line following the error, but maybe not in this case.
          read this
          https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners?_=1589635889121

          you are asking for people to do the work for you, and not learning… time to learn

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          P 3 Replies Last reply Reply Quote 0
          • P Offline
            PHAGE.GOV @sdetweil
            last edited by

            @sdetweil okay mom lmaoo, and yes, i agree

            1 Reply Last reply Reply Quote 0
            • P Offline
              PHAGE.GOV @sdetweil
              last edited by

              so sensei @sdetweil , i got this.

              hecking file...  /home/pi/MagicMirror/config/config.js
              Line 41 col 4 Parsing error: Unexpected token Welcome_message
              
              

              so does that just mean i should delete that line altogether?

              S 1 Reply Last reply Reply Quote 0
              • P Offline
                PHAGE.GOV @sdetweil
                last edited by

                @sdetweil wait so it said the options were “string” and “false” for “welcome message” thats where its wrong, so i think its fixed?? ill update if it isnt fixed lol

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @PHAGE.GOV
                  last edited by

                  @PHAGE-GOV said in Config Error:

                  so does that just mean i should delete that line altogether?

                  no idea… maybe it is an important line,

                  but as I said, the error is reported on the line after the actual problem

                  if u read the linked getting started

                  you would see that elements in config.js are

                      sometext : somevalue
                  

                  where somevalue MUST be quoted before and after (single or double doesn’t matter, as long as both ends are the same)
                  unless somevalue is true/false, or a number

                  AND you need to add a continuation char (comma ,) at the end to the line if the next line
                  is include in this info, or more info is comming (another module config for example)

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    PHAGE.GOV @sdetweil
                    last edited by

                    @sdetweil yeah ill try that, i tried fixing “string” because it had an extra space in it but i got the no config.js file again, i will try looking for the other stuff rn

                    S lavolp3L 2 Replies Last reply Reply Quote 0
                    • S Offline
                      sdetweil @PHAGE.GOV
                      last edited by

                      @PHAGE-GOV said in Config Error:

                      in it but i got the no config.js file again,

                      if it has an error in the config, it throws up its hands and says no config…
                      yes there is one, but he can’t tell what to do

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      P 1 Reply Last reply Reply Quote 0
                      • lavolp3L Offline
                        lavolp3 Module Developer @PHAGE.GOV
                        last edited by lavolp3

                        @PHAGE-GOV I guess you have that part in the alert module.

                        It needs to be like @sdetweil said. on the left side a single word, here welcome_message. You need to take care of underlines and the upper-/lowercase.
                        Then there is a : and then the value which can be a string or false.

                        welcome_message: 'Any string you like'
                        

                        OR

                        welcome_message: false
                        

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

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

                          @lavolp3 but his error was

                          Unexpected token Welcome_message

                          so, one at least more this is wrong

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

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

                            @sdetweil Looking at above post, there’s looots of errors in the config.

                            @PHAGE-GOV we can’t lead you through all of these.
                            You need to understand how config.js needs to look. Only one comma set false or forgotten breaks the whole file and the mirror.

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

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

                              @lavolp3 The alert part needs to look like this:

                              		{
                              			module: "alert",
                              			position: "right",
                              			welcome_message: "a string"
                              		},
                              

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

                              P 1 Reply Last reply Reply Quote 0
                              • P Offline
                                PHAGE.GOV @sdetweil
                                last edited by

                                @sdetweil okay so ive been combing through the code, and since i didnt know how to properly edit .json files, i had alot of cleanup to do, im still not done, but getting there. what is a trailing space though? i dont know what to remove

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  PHAGE.GOV @lavolp3
                                  last edited by

                                  @lavolp3

                                  {
                                  			module: "compliments",
                                  			position: "lower_third",
                                  			compliments: {	
                                  				"anytime" : [
                                  					"Hey there sexy!"
                                  				],
                                  				"morning" : [
                                  

                                  so 64 is the compliments line and it says it has trailing spaces. Im actually learning so much about json files rn so thank you @sdetweil and @lavolp3

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @PHAGE.GOV
                                    last edited by

                                    @PHAGE-GOV ignore the trailing space error. It’s stupid

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      PHAGE.GOV @sdetweil
                                      last edited by

                                      @sdetweil indeed it is, i found it tho, and i fixed everything else too! thank you so much! and i learned so much from this also, i feel much more confident poking around and i defs learned much more about proper coding

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @PHAGE.GOV
                                        last edited by

                                        @PHAGE-GOV and finding your way on the next error. After 3 years I still make them

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        P 1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          PHAGE.GOV @sdetweil
                                          last edited by

                                          @sdetweil yeah, but npm run config:check was such a life saver

                                          1 Reply Last reply Reply Quote 1
                                          • BKeyportB Offline
                                            BKeyport Module Developer
                                            last edited by

                                            one of the biggest tips I can give you is to throw out everything you know about capitalization…
                                            Welcome_message is different from welcome_message

                                            Most of the time, with RARE exception, the initial letter is lowercase. javacriptIsWeird

                                            The "E" in "Javascript" stands for "Easy"

                                            S 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