h0x91b / redis-fast-driver

78 stars 13 forks source link

is the lib still supported? #59

Closed Dmitry-N-Medvedev closed 1 year ago

Dmitry-N-Medvedev commented 1 year ago

recently I have returned to redis and found that this lib does not longer "function":

node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Cannot find module './build/Release/redis-fast-driver'
Require stack:
- /Users/dmitrymedvedev/projects/gs/node_modules/.pnpm/redis-fast-driver@2.2.5/node_modules/redis-fast-driver/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15)
    at Module._load (node:internal/modules/cjs/loader:923:27)
    at Module.require (node:internal/modules/cjs/loader:1137:19)
    at require (node:internal/modules/helpers:121:18)
    at Object.<anonymous> (/Users/dmitrymedvedev/projects/gs/node_modules/.pnpm/redis-fast-driver@2.2.5/node_modules/redis-fast-driver/index.js:2:15)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module.replacementCompile (/Users/dmitrymedvedev/projects/gs/node_modules/.pnpm/append-transform@2.0.0/node_modules/append-transform/index.js:60:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
    at Object.<anonymous> (/Users/dmitrymedvedev/projects/gs/node_modules/.pnpm/append-transform@2.0.0/node_modules/append-transform/index.js:64:4)
    at Module.load (node:internal/modules/cjs/loader:1113:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/dmitrymedvedev/projects/gs/node_modules/.pnpm/redis-fast-driver@2.2.5/node_modules/redis-fast-driver/index.js'
  ]
}

Node.js v20.3.0
h0x91b commented 1 year ago

Hi, works fine for me, try to delete node_modules and re-install it

 ~/Desktop/src/redis-fast-driver   master  node -v
v20.2.0
 ~/Desktop/src/redis-fast-driver   master  node example.js
redis ready
SET via rawCall command returns err: null, resp: OK
PING null PONG
hmget null [ '1', '2', '3', null ] 11
zrange null [
  'a', '1', 'b',
  '2', 'c', '3',
  'd', '4'
]
hgetall null [ 'a', '1', 'b', '2', 'c', '3' ] 6
scan 0 null [ '0', [ 'zset:1', 'kv:long', 'foo', 'INCR:TMP', 'hset:1' ] ]
hscan 0 null [ '0', [ 'a', '1', 'b', '2', 'c', '3' ] ]
sizeof long key is 1024
PING null PONG
hmget null [ '1', '2', '3', null ] 11
zrange null [
  'a', '1', 'b',
  '2', 'c', '3',
  'd', '4'
]
hgetall null [ 'a', '1', 'b', '2', 'c', '3' ] 6
scan 0 null [ '0', [ 'zset:1', 'kv:long', 'foo', 'INCR:TMP', 'hset:1' ] ]