Skip to content

Incompatible with NestJS cache store #53

Open
kin-labs/kinetic
#523
@consult-kk

Description

@consult-kk

V3.0.1 is incompatible with NestJS . Unable to register CacheModule using the RedisStore.

"message": "Type 'typeof import(\"cache-test/node_modules/cache-manager-redis-store/dist/index\")' is not assignable to type '(string | CacheStoreFactory | CacheStore) & typeof import(\"/Users/kk/dev/nodejs/cache-test/node_modules/cache-manager-redis-store/dist/index\")'.\n  ...

Here is the code I am using in the module.ts :
`
import * as redisStore from "cache-manager-redis-store";
import { ConfigModule } from '@nestjs/config';

@module({
imports: [
ConfigModule.forRoot(),
CacheModule.register({
isGlobal: true,
store: redisStore,
url: "redis://localhost:6379",
}),
HttpModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions