Nest can't resolve dependencies of the RedisService - Symbol(REDIS_CLIENT)
See original GitHub issueHi! Can anyone help me?
On Application start i got this error:
Nest can't resolve dependencies of the RedisService (?). Please make sure that the argument Symbol(REDIS_CLIENT) at index [0] is available in the RedisModule context.
my source
config
import { RedisModuleOptions } from 'nestjs-redis';
export const redis: RedisModuleOptions = {
name: 'redis',
host: process.env.REDIS_HOST,
port: parseInt(process.env.REDIS_PORT),
db: parseInt(process.env.REDIS_DB),
password: process.env.REDIS_PASSWORD,
};
module
import { Module } from '@nestjs/common';
import { RedisModule, RedisService } from 'nestjs-redis';
import { MyRedisService } from './redis.service';
import { redis } from './redis.config';
@Module({
imports: [RedisModule.register(redis)],
providers: [MyRedisService, RedisService],
exports: [MyRedisService],
})
export class MyRedisModule {}
service
mport { Injectable } from '@nestjs/common';
import { RedisService } from 'nestjs-redis';
@Injectable()
export class MyRedisService {
constructor(private readonly _redisService: RedisService) {}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
NestJs can't resolve dependencies of the HeicService
I separated it into two modules redis-publish and redis-cache and still only if I cut both dependencies out of the heic.module it works...
Read more >Common errors - FAQ - A progressive Node.js framework
"Cannot resolve dependency" error#. Probably the most common error message is about Nest not being able to resolve dependencies of a provider. The...
Read more >please make sure that the argument cache_manager at index ...
Sign up for free ... Nest can't resolve dependencies of the (?). ... expected to not have errors and successfully get the key...
Read more >20 Dependents - @liaoliaots/nestjs-redis - npm
Redis (ioredis) module for Nest framework (node.js).. Latest version: 9.0.4, last published: a month ago.
Read more >Getting started with continuous integration for Nest.js APIs
js app; Writing, running, and automating tests. Nest.js is a scalable and efficient server-side Node.js framework built with TypeScript.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rares-lupascu there’s a newer release here: https://www.npmjs.com/package/nestjs-redis
See also: https://github.com/skunight/nestjs-redis/issues/82