You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the example straight from the readme.md, setArgumentTransformer throws an error:
Redis.Command.setArgumentTransformer('hmset', function (args) {
^
TypeError: Cannot read property 'setArgumentTransformer' of undefined
at Object.<anonymous> (/Users/marcoslh/Dropbox/fineappsco/auth/lib/db/index.js:8:14)
at Module._compile (module.js:431:26)
at Object.Module._extensions..js (module.js:449:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/marcoslh/Dropbox/fineappsco/auth/tests/db.js:3:12)
at Module._compile (module.js:431:26)
at Object.Module._extensions..js (module.js:449:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at /usr/local/lib/node_modules/mocha/lib/mocha.js:192:27
at Array.forEach (native)
at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:189:14)
at Mocha.run (/usr/local/lib/node_modules/mocha/lib/mocha.js:422:31)
at Object.<anonymous> (/usr/local/lib/node_modules/mocha/bin/_mocha:398:16)
at Module._compile (module.js:431:26)
at Object.Module._extensions..js (module.js:449:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:472:10)
at startup (node.js:124:18)
at node.js:959:3
requires utils definition. Looking into the source, the only way I see is to import this is by using the local utils module: const utils = <app-dir>/node_modules/ioredis/lib/utils (or maybe is lack of imagination, I was working late yesterday).
Am I missing something?
The text was updated successfully, but these errors were encountered:
Oops, it seems Command hasn't been exported correctly for a long time. Just fixed it. Thank you for pointing it out.
utils.convertMapToArray is an internal module of ioredis. The code snippet is just a sample telling people how to use setArgumentTransformer. Added a comment in the Readme. 😄
If you run the example straight from the readme.md, setArgumentTransformer throws an error:
and there's no other reference to Command.
Also the line:
requires utils definition. Looking into the source, the only way I see is to import this is by using the local utils module:
const utils = <app-dir>/node_modules/ioredis/lib/utils
(or maybe is lack of imagination, I was working late yesterday).Am I missing something?
The text was updated successfully, but these errors were encountered: