【发布时间】:2022-01-17 22:16:27
【问题描述】:
将nest 升级到v8 后,我无法使nestjs-i18n 正常工作。
这是我遇到的错误
Nest can't resolve dependencies of the I18nLanguageInterceptor (I18nOptions, I18nResolvers, I18nService, ?). Please make sure that the argument ModuleRef at index [3] is available in the I18nModule context.
Potential solutions:
If ModuleRef is a provider, is it part of the current I18nModule?
If ModuleRef is exported from a separate @Module, is that module imported within I18nModule?
@Module({
imports: [ /* the Module containing ModuleRef */ ]
})
- {"stack":["Error: Nest can't resolve dependencies of the I18nLanguageInterceptor (I18nOptions, I18nResolvers, I18nService, ?).
Please make sure that the argument ModuleRef at index [3] is available in the I18nModule context.
Potential solutions:
- If ModuleRef is a provider, is it part of the current I18nModule?
- If ModuleRef is exported from a separate @Module, is that module imported within I18nModule?
@Module({ imports: [ /* the Module containing ModuleRef */ ] })
版本:
"@nestjs/common": "^8.2.0",
"@nestjs/core": "^8.2.0",
"nestjs-i18n": "8.2.2",
"rxjs": "^7.4.0",
感谢您的帮助
【问题讨论】:
-
你在使用 monorepo 吗?
标签: nestjs nestjs-i18n