nestjs-redis
nestjs-redis copied to clipboard
Nest can't resolve dependencies of the RedisService - Symbol(REDIS_CLIENT)
Hi! 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) {}
}
getting the same when using nest8
Same when using nestjs 8 https://github.com/nestjs/nest/releases/tag/v8.0.0 Now it`s officially released.
Encountered the same problem, have you solved it now? @alikil @augustnmonteiro @invertedcrow
+1
guyz the latest release is from July 2019 ... I am scared to state the obvious :)
@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