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.

    Issue with default Weather module

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 2 Posters 401 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
      kevmang
      last edited by

      Hi There

      I’m getting an error wiith the default weather module after updating to the latest version of MM. I tested my API key manually and it works.

      This is the error message, any suggestions?

      [15.10.2022 22:06.59.726] [LOG]   Sockets connected & modules started ...
      [15.10.2022 22:06.59.805] [LOG]   Launching application.
      [15.10.2022 22:07.00.313] [ERROR] ERROR! Could not validate main module js file.
      [15.10.2022 22:07.00.315] [ERROR] /home/pi/MagicMirror/modules/default/weather/weather.js:159
                              currentWeather: this.weatherProvider?.currentWeatherObject?.simpleClone() ?? null,
                                                                   ^
      
      SyntaxError: Unexpected token .
          at Module._compile (internal/modules/cjs/loader.js:722:23)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
          at Module.load (internal/modules/cjs/loader.js:645:32)
          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
          at Module.require (internal/modules/cjs/loader.js:685:19)
          at require (internal/modules/cjs/helpers.js:16:16)
      

      This is what my config looks like (API key removed):

      		{
      			"module": "weather",
      			"disabled": true,
      			"header": "Weather In Doncaster, AU",
      			"position": "top_right",
      			"config": {
      				"apiKey": "XXXXXXXXX",
      				"weatherEndpoint": "/weather",
      				"locationID": "2168607",
      				"location": "Melbourne,Australia",
      				"weatherProvider": "openweathermap",
      				"type": "current",
      				"degreeLabel": true,
      				"onlyTemp": false,
      				"showHumidity": true
      			}
      		},
      		{
      			"module": "weather",
      			"disabled": true,
      			"header": "Forecast In",
      			"position": "top_right",
      			"config": {
      				"apiKey": "XXXXX",
      				"weatherEndpoint": "/forecast",
      				"locationID": "2168607",
      				"location": "Melbourne,Australia",
      				"weatherProvider": "openweathermap",
      				"type": "forecast",
      				"degreeLabel": true,
      				"onlyTemp": false,
      				"showHumidity": false,
      				roundTemp: true,
      				showPrecipitationAmount: true,
      				colored: false,
      				tableClass: "small",
      				maxNumberOfDays: 5
      			}
      		},
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @kevmang
        last edited by

        @kevmang you also need to upgrade your node js version

        my upgrade script will install version 16

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        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