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.

    unexpected token error

    Scheduled Pinned Locked Moved Solved Troubleshooting
    12 Posts 3 Posters 1.4k Views 3 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.
    • KristjanESPERANTOK Offline
      KristjanESPERANTO Module Developer @sdetweil
      last edited by

      There is a comma to much at the end of the keywords array: "Forecast",

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

        @KristjanESPERANTO said in unexpected token error:

        There is a comma to much at the end of the keywords array: “Forecast”,

        javascript is very accepting of TOO MANY commas…
        and NOT accepting of not enough .

        but I don’t understand what MM is complaining about the package.json

        unless its the enhancement to updateNotification…

        [ERROR] SyntaxError: Error parsing /home/lolo/MagicMirror/modules/MMM-OpenWeatherMapForecast/package.json: Unexpected token ‘]’, …“ast”,
        ],
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
        • G Offline
          Guku @KristjanESPERANTO
          last edited by

          @KristjanESPERANTO

          that was it! thank you so much!
          it loads now.

          1 Reply Last reply Reply Quote 1
          • S sdetweil has marked this topic as solved on
          • KristjanESPERANTOK Offline
            KristjanESPERANTO Module Developer @sdetweil
            last edited by

            @sdetweil said in unexpected token error:

            javascript is very accepting of TOO MANY commas…

            That’s right about JavaScript. But trailing commas are a syntax error in JSON files.

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

              @KristjanESPERANTO said in unexpected token error:

              syntax error in JSON files.

              never mind… I didn’t catch that it was in json file…

              but the user shouldn’t be editing the file… so its the authors error…
              as the author just updated it I think

              but how did he npm install??
              unless he did a git pull and didn’t npm install

              I see this latest is the case, as you opened issue.
              I updated to point the way …

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              KristjanESPERANTOK 1 Reply Last reply Reply Quote 1
              • KristjanESPERANTOK Offline
                KristjanESPERANTO Module Developer @sdetweil
                last edited by KristjanESPERANTO

                My Pull Request has been merged :-)

                Users have to update the module, then the problem should be solved.

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