#httpModul

3 messages · Page 1 of 1 (latest)

unkempt wind
#

i have an AppModule in my project that import TasksRepository,
i imported the nestjs HttpModule to the AppModule but when i try to inject the HttpService to the TasksRepository i get an Error:

Error: Nest can't resolve dependencies of the TasksService ( ?, TasksRepository). Please make sure that the argument HttpService at index [1] is available in the TasksModule context.

i thought that every module that was imported to the main module should be available for other imported modules, what i am doing wrong here?

flat seal
#

Nope. The "parent" module does not provide to the "child" module. Rather, the imported module is able to provide access to its exports to the module that is importing it

brazen jay
#

That would work if HttpModule were a global module