Skip to content

Conversation

@paopaojr
Copy link

Overview

  • Added support for nestjs@10 version with BREAKING CHANGES when use with nestjs@9.
  • Updated the tests by replacingtypeorm-factory package, which doesn't work with [email protected] with jest's spy.
  • Removed debug mode on GraphQLModule, which is not supported on the latest version.
  • Fixed deprecated ts-jest configuration.

Problem

When we use nestjs@10 with nestjs-dataloader@9. It works fine on local development as it installs all dev dependencies. But when we do production prune package, nestjs app throws error on starting up.

$ yarn build # nest build
$ npm prune --production
$ node ./dist/main.js 

...
[APP] Error	1/17/2024, 11:26:07 AM [ExceptionHandler] Nest can't resolve dependencies of the DataLoaderInterceptor (?). Please make sure that the argument ModuleRef at index [0] is available in the ProductModule context.

Potential solutions:
- Is ProductModule a valid NestJS module?
- If ModuleRef is a provider, is it part of the current ProductModule?
- If ModuleRef is exported from a separate @Module, is that module imported within ProductModule?
  @Module({
    imports: [ /* the Module containing ModuleRef */ ]
  })
 - {
  stack: [
    "Error: Nest can't resolve dependencies of the DataLoaderInterceptor (?). Please make sure that the argument ModuleRef at index [0] is available in the ProductModule context.\n" +
      '\n' +
      ....
  ]

@paopaojr
Copy link
Author

@krislefeber can you please review this PR and merge, and release the newer version?

@kpms-yanki-kurtcan
Copy link

@paopaojr have you found a solution to your problem? I have the exact same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants