Modern Full-Stack Development with Nest.js, React, TypeScript, and MongoDB: Part 1

hi, currently I am working on your tutorial, but when I am creating the service, I am getting this error:

[Nest] 48700 - 03/25/2020, 11:12:39 PM [ExceptionHandler] Nest can’t resolve dependencies of the BlogService (?). Please make sure that the argument PostModel at index [0] is available in the BlogModule context.

Potential solutions:

  • If PostModel is a provider, is it part of the current BlogModule?
  • If PostModel is exported from a separate @Module, is that module imported within BlogModule?
    @Module({
    imports: [ /* the Module containing PostModel */ ]
    })