Closed prashantidealittechno closed 8 years ago
@prashantidealittechno thank you for bringing this to my attention. I'll have a look and patch a fix soon.
Hi, I'm probably facing a very related issue. Here's the error I get:
/project/node_modules/georedis/lib/interfaceEmulated.js:38
this.client.zadd(argArray, callBack);
^
TypeError: this.client.zadd is not a function
at EmulatedInterface.geoadd_multi (/project/node_modules/georedis/lib/interfaceEmulated.js:38:17)
at Set.addLocations (/project/node_modules/georedis/main.js:57:26)
at writeToRedis (/project/api/utilities/importGeolocations.js:76:9)
at /project/api/utilities/importGeolocations.js:25:9
at tryToString (fs.js:414:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
@prashantidealittechno @keligijus I'll have time this weekend to look at this.
Can you tell me what version of Redis you are using? If you're using node-redis, which version of node-redis you're using? Otherwise, what client are you using to with georedis?
Please give me as much information as you can about the circumstances. My tests pass when using the latest version of node-redis so I can not replicate.
Hello @arjunmehta, sorrry for the late response, My Redis version is 3.0.6. from he time same I post the issue. My node js dependencies are below:
"dependencies": {
"body-parser": "^1.15.2",
"express": "^4.14.0",
"georedis": "^3.0.3",
"redis": "^2.6.2"
},
@prashantidealittechno This is really strange. Are you following the instructions on how to use this module correctly? ie:
You need to first create your redis client:
var redis = require('redis'),
client = redis.createClient()
And THEN initialize georedis:
var geo = georedis.initialize(client, {
zset: 'acceptToStart',
nativeGeo: false
});
I think I'll close this unless it gets reported again by others.
node_redis: Deprecated: The ZADD command contains a "undefined" argument. This is converted to a "undefined" string now and will return an error from v.3.0 on. Please handle this in your code to make sure everything works as you intended it to.
If you can check and fix. why I am getting this error. How can I fix this.