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.

    Syntax Error Unexpected Token

    Scheduled Pinned Locked Moved Bug Hunt
    4 Posts 2 Posters 1.6k Views 2 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.
    • K Offline
      kizzytodd
      last edited by

      HELP !! I cannot seem to be able to fix this. I updated a module and got an error message. when I run npm run config:check, it say:

      [14.04.2023 20:29.56.895] [INFO] Checking file… /home/ktodd32/MagicMirror/config/config.js
      [14.04.2023 20:29.56.924] [ERROR] Your configuration file contains syntax errors :(
      [14.04.2023 20:29.56.924] [ERROR] Line 16 column 6: Parsing error: Unexpected token :

      I looked at line 16 column 6 in the config file, but still not able to fix it. This is what is there.
      port: 8080

      magicmirror: 2.21.0
      npm: 8.19.3
      node: 16.19.1

      Thanks for any help.

      S 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @kizzytodd
        last edited by

        @kizzytodd the parser keeps going until it finds an obvious error. the cause might be sooner

        in general, unexpected token, means the line before the line reported is missing a trailing comma
        there are other more complicated causes but the trailing comma is the problem 95% of the time

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @kizzytodd said in Syntax Error Unexpected Token:

          port: 8080

          that line will cause a problem too, no trailing comma

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kizzytodd @sdetweil
            last edited by

            @sdetweil Thanks for your feedback. I will check that out and let you know if I am able to resolve.

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