Nestjs 终端 gRPC 健康检查

问题描述 投票:0回答:1

我的问题出在 terminus 模块上,我安装时使用:

yarn add @nestjs/terminus

我将 TerminusModule 添加到我的主模块中。但是当我尝试执行yarn start:dev来处理这个问题时,我总是收到以下错误:

    [Nest] 18136  - 05/05/2023, 11:57:32 PM   ERROR [ExceptionHandler] Nest can't resolve dependencies of the TypeOrmHealthIndicator (?). Please make sure that the argument ModuleRef at index [0] is available in the TerminusModule context.

Potential solutions:
- Is TerminusModule a valid NestJS module?
- If ModuleRef is a provider, is it part of the current TerminusModule?
- If ModuleRef is exported from a separate @Module, is that module imported within TerminusModule?
  @Module({
    imports: [ /* the Module containing ModuleRef */ ]
  })

现在我没有在此应用程序上安装 typeOrm,因为该应用程序不需要或使用它,所以是否强制要求安装此包并在我的模块上声明它?非常感谢任何帮助。

提前谢谢大家。

nestjs health-check
1个回答
0
投票

我也遇到这个问题了。我在我的应用程序中根本不使用 typeorm,但我收到了该错误。 你解决了吗

© www.soinside.com 2019 - 2024. All rights reserved.