Skip to content

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

Open
@maheshupasani

Description

@maheshupasani

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

  • OS: [e.g. Arch Linux]
  • Other details that you think may affect.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions