Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioredis 4.0.1 don't found referenced redis-commands bzpopmin() #716

Closed
lakano opened this issue Oct 8, 2018 · 3 comments
Closed

ioredis 4.0.1 don't found referenced redis-commands bzpopmin() #716

lakano opened this issue Oct 8, 2018 · 3 comments

Comments

@lakano
Copy link

lakano commented Oct 8, 2018

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://:mySecretPassword@10.1.0.100: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

@lakano
Copy link
Author

lakano commented Oct 8, 2018

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

@luin
Copy link
Collaborator

luin commented Oct 8, 2018

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.

@luin luin closed this as completed Oct 8, 2018
@xprudhomme
Copy link

Hello @luin , is it possible to update the commands list with latests/newest additions, such as the LPOS command (Available since 6.0.6)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants