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
I get this error:
Here is my account module:
As you see
AccountCreatedUpdateris actually a part of my module. And the following is my AppModule:But everything works fine for the example repo