Hey everyone, I've been dealing with these issues in my turborepo using pnpm as the package manager, when exporting nestjs modules from local packages.
The first issue was in relation to a module that I exported to my microservices, that initalized the EventEmitterModule with options that should be shared among the microservices, among more things. This gave an error of
Nest can't resolve dependencies of the EventSubscribersLoader .... Please make sure that the argument ModuleRef at index [4] is available in the EventEmitterModule context.
Potential solutions:
- If ModuleRef is a provider, is it part of the current EventEmitterModule?
...
And after some research, it turned out that a solution was to set the @dim citrus/core package as peerDependancy (more info here: https://docs.nestjs.com/faq/common-errors)