Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: support for nest@10 #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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?

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.

1 participant