• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 548 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 Apr 15, 2023, 4:00 AM

    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 Apr 16, 2023, 11:41 AM Reply Quote 0
    • S Away
      sdetweil @kizzytodd
      last edited by Apr 16, 2023, 11:41 AM

      @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 Away
        sdetweil @kizzytodd
        last edited by Apr 16, 2023, 12:32 PM

        @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 Apr 25, 2023, 10:37 PM Reply Quote 0
        • K Offline
          kizzytodd @sdetweil
          last edited by Apr 25, 2023, 10:37 PM

          @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
          • 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