Papooch / nestjs-cls

A continuation-local storage (async context) module compatible with NestJS's dependency injection.
https://papooch.github.io/nestjs-cls/
MIT License
389 stars 23 forks source link

Nest can't resolve dependencies of the ClsModule (?, ModuleRef). Please make sure that the argument HttpAdapterHost at index [0] is available in the ClsModule context. #151

Closed Nijinsha closed 1 month ago

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

How do I fix this?

Nijinsha commented 1 month ago
    "@nestjs/common": "^10.0.0",
    "@nestjs/core": "^10.0.0",
    "reflect-metadata": "^0.2.0",
using this config fixes the issue