liaoliaots / nestjs-redis

Redis module for Nest framework (node.js). Support node-redis & ioredis.
MIT License
388 stars 70 forks source link

Module '"@liaoliaots/nestjs-redis"' has no exported member 'InjectRedis' #553

Open maheshupasani opened 3 weeks ago

maheshupasani commented 3 weeks ago

After upgrading version 9 to version 10, existing code is not working and the decorators are removed in new version 10. A clear and concise description of what the bug is.

src/databases/redis.service.ts:1:10 - error TS2305: Module '"@liaoliaots/nestjs-redis"' has no exported member 'InjectRedis'. 1 import { InjectRedis } from '@liaoliaots/nestjs-redis';


export class RedisService {
  constructor(@InjectRedis() private readonly redisClient: Redis) { }
}

### Steps to reproduce

Below is implementation that is working in v9.
src/databases/redis.service.ts:1:10 - error TS2305: Module '"@liaoliaots/nestjs-redis"' has no exported member 'InjectRedis'.
1 import { InjectRedis } from '@liaoliaots/nestjs-redis';

export class RedisService { constructor(@InjectRedis() private readonly redisClient: Redis) { } }

Expected behavior

It should work after upgrading it to v10 from v9

Environment

Additional context

Add any other context about the problem here.

Scalahansolo commented 4 days ago

Read the v10 update release notes. InjectRedis was removed.