코멘트쪽 api 작성후
더보기
Nest can't resolve dependencies of the BoardColumnsService (Board_ColumnRepository, ?). Please make sure that the argument BoardsService at index [1] is available in the CommentsModule context.
Potential solutions:
- Is CommentsModule a valid NestJS module?
- If BoardsService is a provider, is it part of the current CommentsModule?
- If BoardsService is exported from a separate @Module, is that module imported within CommentsModule?
@Module({
imports: [ /* the Module containing BoardsService */ ]
})
이런 류의 오류가 계속 하여 발생.
아마도 상위 쪽 서비스나 모듈을 계속 불러와줘야되는데 불러오지 않아서 생긴 오류로 생각
import { Module } from '@nestjs/common';
import { CommentsService } from './comments.service';
import { CommentsController } from './comments.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Card } from 'src/_common/entities/card.entity';
import { Comment } from 'src/_common/entities/comment.entity';
import { CardsService } from 'src/cards/cards.service';
import { BoardColumnsService } from 'src/board-columns/board-columns.service';
import { Board_Column } from 'src/_common/entities/board-column.entity';
import { Board } from 'src/_common/entities/board.entity';
import { BoardsService } from 'src/boards/boards.service';
import { WorkspacesService } from 'src/workspaces/workspaces.service';
import { Workspace } from 'src/_common/entities/workspace.entity';
import { Workspace_Member } from 'src/_common/entities/workspace-member.entity';
import { UsersService } from 'src/users/users.service';
import { User } from 'src/_common/entities/user.entitiy';
import { MailService } from 'src/_common/mail/mail.service';
import { JwtService } from 'src/_common/security/jwt/jwt.service';
@Module({
imports: [
TypeOrmModule.forFeature([Card, Comment, Board_Column, Board, Workspace, Workspace_Member, User]), // Card 엔티티 등록
],
controllers: [CommentsController],
providers: [
CommentsService,
CardsService,
BoardColumnsService,
BoardsService,
WorkspacesService,
UsersService,
MailService,
JwtService,
],
})
export class CommentsModule {}
이런 식으로 필요한 서비스, 모듈을 계속 임포트 해줌으로써 해결