Hello,
I've just tested from scratch, and I still have the problem:
const util = require('util')
const dump = (obj) => console.log(util.inspect(obj, false))
const Redis = require('ioredis')
const redis = new Redis('redis://:[email protected]:6379')
redis.on('connect', async () => {
try {
const x = await redis.bzpopmin('myZSet', 0)
console.log('SUCCESS')
dump(x)
}
catch (e) {
console.log('ERROR')
dump(e)
}
})
ERROR
TypeError: redis.bzpopmin is not a function
at Redis.redis.on (/www/test/test.js:9:27)
at emitOne (events.js:116:13)
at Redis.emit (events.js:211:7)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
I use the last version 4.0.1, include the redis-commands 1.3.5:
% cat package.json | grep ioredis
"ioredis": "^4.0.1",
% cat node_modules/ioredis/package.json | grep commands
"redis-commands": "^1.3.5",
The redis-commands correctly declare the command bzpopmin:
https://github.com/NodeRedis/redis-commands/search?q=bzpopmin&unscoped_q=bzpopmin
EDIT: And I use Redis 5.0 RC5, and if I use the command in my redis-cli it's works fine.
Regards
In my node_modules/redis-commands/package.json I have the last version, 1.3.5, but the node_modules/redis-commands/commands.json doesn't include Redis 5.0 commands.... It's not the master branch where the Redis 5.0 commands have been added in July.
BTW, there is an error on Circle CI caused by the devDependency of ioredis: https://github.com/NodeRedis/redis-commands/compare/greenkeeper/ioredis-4.0.1
Sorry for not noticing that. Just published a new version for redis-commands. Now a fresh install of ioredis will support Redis 5.0 commands.
Hello @luin , is it possible to update the commands list with latests/newest additions, such as the LPOS command (Available since 6.0.6)?
Most helpful comment
Sorry for not noticing that. Just published a new version for redis-commands. Now a fresh install of ioredis will support Redis 5.0 commands.