titov_andrei
@titov_andrei
All my life I learn - and die a fool!

Как найти ошибку в запросе Redis?

Делал по этому уроку - www.daspot.ru/2013/07/nodejs-redis_7.html

Код здесь - https://github.com/titov-andrei/weather

Код виджета формируется, но при вызове функции "Показать" вываливается ошибка:

Listening on port 3000
Error null
Error null
Error null
/home/andrew/code/weather/app.js:35
      'dt': new Date(forecast.list[i].dt * 1000).toLocaleDateString(),
                             ^

TypeError: Cannot read property 'list' of null
    at Command.callback (/home/andrew/code/weather/app.js:35:30)
    at normal_reply (/home/andrew/code/weather/node_modules/redis/index.js:721:21)
    at RedisClient.return_reply (/home/andrew/code/weather/node_modules/redis/index.js:819:9)
    at JavascriptRedisParser.returnReply (/home/andrew/code/weather/node_modules/redis/index.js:192:18)
    at JavascriptRedisParser.execute (/home/andrew/code/weather/node_modules/redis-parser/lib/parser.js:574:12)
    at Socket.<anonymous> (/home/andrew/code/weather/node_modules/redis/index.js:274:27)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
  • Вопрос задан
  • 259 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы