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 typeorm@0.3.19 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' +
....
]
Overview
typeorm-factory
package, which doesn't work with typeorm@0.3.19 with jest's spy.GraphQLModule
, which is not supported on the latest version.ts-jest
configuration.Problem
When we use
nestjs@10
withnestjs-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.