I've followed the instruction from nestjs-redis documentation to register RedisModule but it gives me the following error message. I am new to Nest.js and have no idea how to fix this error. If you know the better way to use Redis with nestjs, please suggest me.
Nest can't resolve dependencies of the RedisCoreModule (Symbol(REDIS_MODULE_OPTIONS), ?). Please make sure that the argument ModuleRef at index [1] is available in the RedisCoreModule context.
Potential solutions:
- If ModuleRef is a provider, is it part of the current RedisCoreModule?
- If ModuleRef is exported from a separate @Module, is that module imported within RedisCoreModule? @Module({ imports: [ /* the Module containing ModuleRef */ ] })
my app.module
@Module({
imports: [
RedisModule.register({
host: `${host}`,
port: 6379,
}),
],
})
export class AppModule {}