'Nest can't resolve dependencies .Please make sure that the argument ImageFileS ervice at index [1] is available in the ItemModule context
I get this error
ERROR [ExceptionHandler] Nest can't resolve dependencies of the ItemController (ItemService, ?). Please make sure that the argument ImageFileS service at index [1] is available in the ItemModule context.
I have this code
ImageFileModule :
@Module({
imports: [TypeOrmModule.forFeature([ImageFile]), ConfigModule, ItemModule],
controllers: [ImageFileController],
providers: [ImageFileService],
exports: [ImageFileService],
})
export class ImageFileModule {}
ItemModule :
@Module({
imports: [TypeOrmModule.forFeature([Item])],
controllers: [ItemController],
providers: [ItemService],
exports: [ItemService],
})
export class ItemModule {}
Service That I am trying to use:
@Injectable()
export class ImageFileService {
constructor(
@InjectRepository(ImageFile)
private readonly imageFileRepository: Repository<ImageFile>,
private readonly configService: ConfigService,
private readonly itemService: ItemService,
) {}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
