MagicMirror Forum

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

    UNSOLVED Can't find out what I did wrong in my config.js...

    Troubleshooting
    3
    7
    1195
    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.
    • Cr4z33
      Cr4z33 last edited by Cr4z33

      First of all why are all online JavaScript linters completely useless for our config.js file? 🤔

      They all report completely no sense mistakes while the REAL error might be located in somewhere else line.

      Now back in topic I might have edited/canceled something that has screwed up the file by ending with the CONFIG.JS screen when launching MM. :face_with_cold_sweat:

      Can someone please help me finding the mistake?

      https://pastebin.com/BAQTi012

      1 Reply Last reply Reply Quote 0
      • evroom
        evroom last edited by

        Perhaps this is a start, provided I copy/pasted it right ?
        Although I think you are familiar with this and used other linters to find the ‘mistake’.

        pi@MagicPi:~/MagicMirror $ cd ~/MagicMirror; npm run config:check
        
        Checking file...  /home/pi/MagicMirror/config/config.js
        Line 213 col 42 Missing semicolon.
        Line 218 col 18 Missing semicolon.
        Line 222 col 5 Expected '}' to match '{' from line 190 and instead saw '{'.
        Line 223 col 7 Expected ']' to match '[' from line 28 and instead saw 'module'.
        Line 223 col 13 Expected '}' to match '{' from line 11 and instead saw ':'.
        Line 223 col 14 Missing semicolon.
        Line 224 col 7 Expected an assignment or function call and instead saw an expression.
        Line 224 col 15 Missing semicolon.
        Line 224 col 7 Unrecoverable syntax error. (94% scanned).
        

        I think you missed a } around line 220.

        The “Missing semicolon” messages normally are just nitpicking, but the "Expected ‘}’ to match ‘{’ " are usually true.

        MagicMirror version: 2.23.0
        Raspberry Pi 3 Model B Plus Rev 1.3
        Raspbian GNU/Linux 10 (buster)

        Cr4z33 2 Replies Last reply Reply Quote 0
        • Cr4z33
          Cr4z33 @evroom last edited by

          @evroom thanks for the help I give it immediately a look. 🙂

          Also didn’t know that terminal command.

          1 Reply Last reply Reply Quote 0
          • Cr4z33
            Cr4z33 @evroom last edited by

            @evroom found out the mistake thanks to your suggestion:

            I missed to add an additional close curly bracket after line 213!

            1 Reply Last reply Reply Quote 0
            • evroom
              evroom last edited by

              Glad to help.
              So many errors after only one mistake (the most common to make; we all did it sometime I guess) 🙂

              MagicMirror version: 2.23.0
              Raspberry Pi 3 Model B Plus Rev 1.3
              Raspbian GNU/Linux 10 (buster)

              Cr4z33 1 Reply Last reply Reply Quote 0
              • Cr4z33
                Cr4z33 @evroom last edited by

                @evroom lol indeed! 😄

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

                  Wait, you can audit the config file right from NPM?

                  Daaaaaaaaaaaaaaaaaaaang.

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

                  1 Reply Last reply Reply Quote 0
                  • 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