강의

멘토링

커뮤니티

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

서상원(WON)님의 프로필 이미지
서상원(WON)

작성한 질문수

탄탄한 백엔드 NestJS, 기초부터 심화까지

JWT와 로그인 서비스 & 순환 참조 모듈

오류 질문입니다

작성

·

3K

2

오류가 계속 이렇게 뜨는데 왜 그런건가요?
 
 
src/auth/auth.service.ts:18:58 - error TS2554: Expected 0 arguments, but got 1. 18 const cat = await this.catsRepository.findCatByEmail(email); ~~~~~ src/auth/auth.service.ts:20:10 - error TS1345: An expression of type 'void' cannot be tested for truthiness. 20 if (!cat) { ~~~ src/auth/auth.service.ts:27:11 - error TS2339: Property 'password' does not exist on type 'never'. 27 cat.password, ~~~~~~~~ src/auth/auth.service.ts:34:46 - error TS2339: Property 'id' does not exist on type 'never'. 34 const payload = { email: email, sub: cat.id }; ~~ src/auth/jwt/jwt.strategy.ts:18:43 - error TS2339: Property 'findCatByIdWithoutPassword' does not exist on type 'CatsRepository'. 18 const cat = await this.catsRepository.findCatByIdWithoutPassword( ~~~~~~~~~~~~~~~~~~~~~~~~~~ [오후 9:01:08] Found 5 errors. Watching for file changes.

답변 1

0

윤상석님의 프로필 이미지
윤상석
지식공유자

findCatsByIdWithoutPassword 메서드가 cats.repository.ts 에서 정의 안되어 있습니다. 확인해주세요!

서상원(WON)님의 프로필 이미지
서상원(WON)

작성한 질문수

질문하기