Cannot read property 'length' of undefined
redis module 0.8.1 redis-server 2.4.15 node version 0.8.8
code: var redis = require("redis-client").createClient(); redis.rpush("foo", "bar");
error:
/root/node_modules/redis-client/lib/redis-client.js:394
var callback = originalCommand[originalCommand.length - 1];
^
TypeError: Cannot read property 'length' of undefined
at Client.onReply_ (/root/node_modules/redis-client/lib/redis-client.js:394:51)
at ReplyParser.feed.maybeCallbackWithReply (/root/node_modules/redis-client/lib/redis-client.js:143:30)
at ReplyParser.feed (/root/node_modules/redis-client/lib/redis-client.js:169:21)
at Socket.
It seems you used another redis module, redis-client is different from redis.
Try npm install redis instead of npm install redis-client.
Thanks skenqbx! I am an idiot, sorry... My fault.