nestjs / docs.nestjs.com

The official documentation https://docs.nestjs.com 📕
MIT License
1.13k stars 1.61k forks source link

Update mongo.md #3014

Closed Inaruslynx closed 1 month ago

Inaruslynx commented 1 month ago

Added exports: [CatsService, MongooseModule], due to experiencing errors where AppModule would give error on CatModel. The above addition resolves issue.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

When code compiles an error is given Nest can't resolve dependencies of the CatService (?). Please make sure that the argument "CatModel" at index [0] is available in the AppModule context

Issue Number: N/A

What is the new behavior?

Code will compile.

Does this PR introduce a breaking change?

Other information

prateekkathal commented 1 month ago

I don't think this is the intended solution the problem you are facing.

What do you exactly mean by:

due to experiencing errors where AppModule would give error on CatModel. The above addition resolves issue

Kindly provide some code to support your issue

kamilmysliwiec commented 1 month ago

CatsService should not be registered in AppModule