인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

soi0125님의 프로필 이미지
soi0125

작성한 질문수

따라하며 배우는 NestJS

게시물 생성하기 (Controller 부분)

BoardsService에 getAllBoards property가 없다고 나옵니다

작성

·

439

0

안녕하세요! 좋은 강의 무료로 제공해주셔서 정말 감사합니다!

다름이 아니라 강의 초반 board api 작성중인데요!

강의와 똑같이 board controller에서 boardService DI하고 getAllBoards, createBoard 메서드를 불러왔는데, 아래와 같은 에러가 발생합니다

어떻게 처리하면 될지 알려주시면 정말 감사드리겠습니다!

boards.service.ts

boards.controller.ts

Error log

src/boards/boards.controller.ts:2:23 - error TS2306: File '/Users/jeongsoi/project/maumlab/src/boards/board.model.ts' is not a module.

2 import { Board } from './board.model';
                        ~~~~~~~~~~~~~~~

src/boards/boards.controller.ts:15:35 - error TS2339: Property 'getAllBoards' does not exist on type 'BoardsService'.

15         return this.boardsService.getAllBoards();
                                     ~~~~~~~~~~~~

src/boards/boards.controller.ts:22:35 - error TS2339: Property 'createBoard' does not exist on type 'BoardsService'.

22         return this.boardsService.createBoard(title, description);

 

답변

답변을 기다리고 있는 질문이에요
첫번째 답변을 남겨보세요!
soi0125님의 프로필 이미지
soi0125

작성한 질문수

질문하기