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

Cannot find module '@redis/client/lib/commands/generic-transformers #2871

Open
Djay77 opened this issue Nov 25, 2024 · 1 comment
Open

Cannot find module '@redis/client/lib/commands/generic-transformers #2871

Djay77 opened this issue Nov 25, 2024 · 1 comment
Labels

Comments

@Djay77
Copy link

Djay77 commented Nov 25, 2024

Description

Hello,

I tried to use the sentinel mode in version 5.0.0-next.5 but I have a problem with this error when I use the createSentinel from @redis/client.

I'm in a Next.js project and I have a custom cache handler to use Redis

const { createSentinel } = require('@redis/client');

But, I have an error : "Cannot find module '@redis/client/lib/commands/generic-transformers"

There are not lib folder in my node_modules for @redis/client. The lib folder is IN the dist/

image

Is it en error or I don't call correctly the createSentinel ?

Thanks

Node.js Version

20.15.1

Redis Server Version

No response

Node Redis Version

No response

Platform

Kubernetes

Logs

⨯ Error: Cannot find module '@redis/client/lib/commands/generic-transformers'
Require stack:
- /app/node_modules/@redis/search/dist/lib/commands/CREATE.js
- /app/node_modules/@redis/search/dist/lib/commands/ALTER.js
- /app/node_modules/@redis/search/dist/lib/commands/index.js
- /app/node_modules/@redis/search/dist/lib/index.js
- /app/node_modules/redis/dist/index.js
- /app/node_modules/@neshca/cache-handler/dist/handlers/redis-stack.cjs
- /app/cache-handler.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at /app/node_modules/next/dist/server/require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/app/node_modules/@redis/search/dist/lib/commands/CREATE.js:4:32)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/node_modules/@redis/search/dist/lib/commands/CREATE.js',
    '/app/node_modules/@redis/search/dist/lib/commands/ALTER.js',
    '/app/node_modules/@redis/search/dist/lib/commands/index.js',
    '/app/node_modules/@redis/search/dist/lib/index.js',
    '/app/node_modules/redis/dist/index.js',
    '/app/node_modules/@neshca/cache-handler/dist/handlers/redis-stack.cjs',
    '/app/cache-handler.cjs'
  ]
}
@Djay77 Djay77 added the Bug label Nov 25, 2024
@tonywangcn
Copy link

same here, did U solve this issue ? @Djay77

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

No branches or pull requests

2 participants