nestjsx/crud xxxRepository not found问题解决
                    目录
                    
                
                
            nestjsx/crud xxxRepository not found问题解决
nestjsx/crud可以快速帮我生成   使用@Entity 定义好typeorm对象的对应service,controller的 增删改查操作API  .
但是,使用 nestjsx/crud时,总是会有例如: Nest can't resolve dependencies of the XXXService (?). Please make sure that the argument UtilsService at index [0] is available in the UtilsModule context.的错误,
其原因一般为,在XXXModule中没有import对应 TypeOrm.forFeature([XXXEntity]),在exports及providers中没有导出XXXService,
总要, 在app.module.ts中,同样也需要在@Muldue的imports中增加XXXModule.
注意,如果XXXModule是定义在nestjs的library中,需要在XXXModule.eports中增加TypeOrmModule,不然在app编译运行后,会报错提示XXXService中没有导入XXXEntityRepository对象.
tags: tag: nestjs, typeorm, entity, nestjsx/crud, can’t resolve dependencies