Material-Usenet-Dashboard
Material-Usenet-Dashboard copied to clipboard
Forecastio Errors
media@media:~/Material-Usenet-Dashboard$ node app.js
/home/media/Material-Usenet-Dashboard/routes/weather.js:10
currentTemp : Math.round(data.currently.temperature),
^
TypeError: Cannot read property 'currently' of undefined
at /home/media/Material-Usenet-Dashboard/routes/weather.js:10:49
at /home/media/Material-Usenet-Dashboard/node_modules/forecastio/index.js:23:21
at Request._callback (/home/media/Material-Usenet-Dashboard/node_modules/forecastio/index.js:68:14)
at Request.self.callback (/home/media/Material-Usenet-Dashboard/node_modules/request/request.js:199:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/home/media/Material-Usenet-Dashboard/node_modules/request/request.js:1036:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/home/media/Material-Usenet-Dashboard/node_modules/request/request.js:963:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
I will try to patch this, but I thought you might like to know that the app crashes when I try to connect to it on :3000
. I get some HTML, but none of the APIs populate due to it crashing with the above error.
Project looks great, I will definitely get it working on my end.
do you have the raw API JSON output? i don't have any error handling/checking in my code :-1:
this is what i'm trying to pull from the API
{
"latitude":37.8267,
"longitude":-122.423,
"timezone":"America/Los_Angeles",
"offset":-7,
"currently":{
...
"temperature":56.93,
...
},
...
}