inflearn logo
강의

講義

知識共有

Node.jsにTypeScriptを適用する(feat. NodeBird)

passport/index.ts 에러 입니다

解決済みの質問

456

qwe62939130

投稿した質問数 26

1

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

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

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

 

 

passport 웹앱 nodejs typescript

回答 1

1

zerocho

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

{
"ts-node": {
"files": true
},
"compilerOptions": {
"strict": true,
"lib": ["es2020"],
"esModuleInterop": true,
"moduleResolution": "node",
"typeRoots": ["./types"]
}
}

0

qwe62939130

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

'S3' 형식에 'S3Client' 형식의 destroy, middlewareStack, send 속성이 없습니다.ts(2739)

0

514

1

throw new Error(`${this.name}.hasMany called with something that's not a subclass of Sequelize.Model`); 에러 질문

0

348

1

안녕하세요.. connect ECONNREFUSED 127.0.0.1:3306 관련해서 질문드립니다

0

964

1

@types를 dependencies에 넣는 이유?

0

407

1

JS에서 babel 사용시 `import * as` 구문을 안써도되는데, 바벨이 esModuleInterop: true 로 처리해주는 것인가요?

0

322

1

Sequelize Association 오류

0

526

2

Sequelize constructor.primaryKeyAttributes 오류

0

987

1

Sequelize에 요청을 보내면 오류가 뜹니다

0

803

1

강좌에서 사용된 3개의 코드 의미가 궁금합니다 [ 코드 : 1. [ key:string]:string] 2. delete user.password , 3.passport.deserializeUser<number> ]

0

342

1

@mui/x-data-grid 에 사용자정의 컬럼 타입을 추가해서 사용하려고 합니다.

0

2634

1

미들웨어 에러

1

318

1

Could not find a declaration file for mould '../utils/jwt-utils'

1

185

1

마지막에 type과 interface 추가하는 부분

0

223

1

다른 컴퓨터에서 제가 만든 DB 테이블의 데이터를 그대로 사용하려면?

0

292

1

express 모듈 에러 관련

0

246

1

import * as A from 'B'

0

219

1

MySql ssl 보안 옵션 질문 입니다.

0

363

2

routes/post.ts 페이지에서 에러나요..

0

315

1

passport/index.ts 에러납니다...

0

819

1

ts import 에러

0

444

1

타입스크립트로 변환후 nextjs 빌드 후 배포

0

264

1

sequelize include 질문드립니다.!

0

193

1

roperty 'id' does not exist on type 'User'.

0

906

1

passport user.id 질문드립니다.

0

205

1