강의

멘토링

커뮤니티

Inflearn Community Q&A

qwe62939130's profile image
qwe62939130

asked

Applying TypeScript to Node.js (feat. NodeBird)

passport/index.ts 에러 입니다

Resolved

Written on

·

433

1

안녕하세요!  passport/index.ts에서 에러가 발생합니다. 

공지사항에 남겨주신 부분 참고해서 types/index.d.ts에 추가도 하였는데 에디터에는 에러가 발생하지 않고 nodemon으로 실행을 하니 에러가 발생합니다. 

다른 질문들 찾아보니 npx tsx --noEmit 이 있어서 해봤더니 이 명령어에서는 에러가 발생하지 않습니다.  아래는 에러 및 코드 입니다!

 

 

passport웹앱nodejstypescript

Answer 1

1

zerocho님의 프로필 이미지
zerocho
Instructor

tsconfig.json에는 ts-node 부분 추가하시면 될 겁니다.

{
"ts-node": {
"files": true
},
"compilerOptions": {
"strict": true,
"lib": ["es2020"],
"esModuleInterop": true,
"moduleResolution": "node",
"typeRoots": ["./types"]
}
}
qwe62939130님의 프로필 이미지
qwe62939130
Questioner

감사합니다! 덕분에 해결했습니다!

qwe62939130's profile image
qwe62939130

asked

Ask a question