Hello,
I have exactly the same problem as this ticket: #1161017385755611237 message
My project is a monorepo turbo.build (using pnpm) with nestjs microservices.
|-- node_modules
|-- package.json
|-- apps
|-- api-gateway
|-- node_modules
|-- package.json
|-- svc-common
|-- node_modules
|-- package.json
|-- svc-notification
|-- node_modules
|-- package.json
|-- packages
|-- schemas
|-- node_modules
|-- package.json
|-- types
|-- package.json
As mentioned in the ticket previously quoted, in connection with the installation of @golevelup/nestjs-rabbitmq. My problem being:
[Nest] 41040 - 28.12.2023, 11:36:09 ERROR [ExceptionHandler] Nest can't resolve dependencies of the DiscoveryService (?, MetadataScanner). Please make sure that the argument ModulesContainer at index [0] is available in the DiscoveryModule context.
- I don't understand this story about having several
@nestjs/core. In my project, I hope that "api-gateway" uses itsnode_modulesfolder only. There is no need for multiple@nestjs/core. - It says that
@nestjs/coreshould be installed at the root of monorepo. In my opinion, this makes no sense, as my packages have no need for it (and it's a disaster to deploy with PNPM and its symbolic links). It might be easier for me to have one node_module per project.
How to fix it ? What are the best practices? What do I have to do?
Thanks for helping