Nest can't resolve dependencies of the RedisCoreModule (Symbol(REDIS_MODULE_OPTIONS), ?). Please make sure that the argument ModuleRef at index [1] is available in the RedisCoreModule context.
See original GitHub issue// config.ts
export const redisConfig: RedisModuleOptions = {
url: 'redis://treehole:redis@localhost:6379/1',
}
import databaseConfig, { redisConfig } from './config/database.config'
@Module({
imports: [TypeOrmModule.forRoot(databaseConfig), UserModule, AuthModule, RedisModule.register(redisConfig)],
controllers: [],
providers: [],
})
export class AppModule {}
But it gave me an error
[Nest] 35656 - 2022/02/14 下午3:50:35 ERROR [ExceptionHandler] Nest can't resolve dependencies of the RedisCoreModule (Symbol(REDIS_MODULE_OPTIONS), ?). Please make sure that the argument ModuleRef at index [1] is available in the RedisCoreModule co
ntext.
Potential solutions:
- If ModuleRef is a provider, is it part of the current RedisCoreModule?
- If ModuleRef is exported from a separate @Module, is that module imported within RedisCoreModule?
@Module({
imports: [ /* the Module containing ModuleRef */ ]
})
Error: Nest can't resolve dependencies of the RedisCoreModule (Symbol(REDIS_MODULE_OPTIONS), ?). Please make sure that the argument ModuleRef at index [1] is available in the RedisCoreModule context.
Potential solutions:
- If ModuleRef is a provider, is it part of the current RedisCoreModule?
- If ModuleRef is exported from a separate @Module, is that module imported within RedisCoreModule?
@Module({
imports: [ /* the Module containing ModuleRef */ ]
})
at Injector.lookupComponentInParentModules (C:\Dev\hfut-tree-hole\nest\node_modules\@nestjs\core\injector\injector.js:202:19)
at Injector.resolveComponentInstance (C:\Dev\hfut-tree-hole\nest\node_modules\@nestjs\core\injector\injector.js:157:33)
What happen? And what should i do to solve it? I’m sure that the redis server is no wrong.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:21
Top Results From Across the Web
How to register RedisModule in Nest.js? - Stack Overflow
Nest can't resolve dependencies of the RedisCoreModule (Symbol(REDIS_MODULE_OPTIONS), ?). Please make sure that the argument ModuleRef at ...
Read more >Common errors - FAQ - A progressive Node.js framework
Nest can't resolve dependencies of the <provider> (?). Please make sure that the argument ModuleRef at index [<index>] is available in the ...
Read more >nest can't resolve dependencies of the rediscoremodule
Please make sure that the argument ModuleRef at index [1] is available in the RedisCoreModule context. Comment. 3.
Read more >fix #82 Nest 8 bug. (0b1f99ac) · 提交· 王智锐(C) / nestjs-redis
export declare class RedisCoreModule implements OnModuleDestroy { ... RedisModuleOptions | RedisModuleOptions[], moduleRef: ModuleRef);.
Read more >nest can't resolve dependencies of the - You.com
Please make sure that the argument dependency at index [1] is available in the LeadModule context. From this output, I can conclude that...
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
i resolved by change
package.json
to"nestjs-redis": "github:skunight/nestjs-redis",
Fixed by using
@liaoliaots/nestjs-redis
instead.