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

Error with NestJS v9: Error: Nest could not find AccountCreatedUpdater element #24

Open
vahidvdn opened this issue Aug 26, 2022 · 1 comment

Comments

@vahidvdn
Copy link

I get this error:

Error: Nest could not find AccountCreatedUpdater element (this provider does not exist in the current context)

Here is my account module:

@Module({
  imports: [
    TypeOrmModule.forFeature([Account]),
    CqrsModule,
    CommonModule,
    EventSourcingModule.forFeature(),
  ],
  controllers: [AccountController],
  providers: [
    CreateAccountHandler,
    UserCreatedHandler,
    // this is PROVIDER here
    AccountCreatedUpdater,
  ]
})

As you see AccountCreatedUpdater is actually a part of my module. And the following is my AppModule:

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal:true }),
    TypeOrmModule.forRootAsync(typeOrmFactory),
    AccountModule,
    EventSourcingModule.forRoot({
      mongoURL: 'mongodb://mymongo:27017/eventstore',
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

But everything works fine for the example repo

@muthyalaDivyaVenkatesh
Copy link

hi,

Did you find the Fix @vahidvdn Nestjs 9 i am also facing similar 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

No branches or pull requests

2 participants