You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
findOne(), create() 등의 함수를 사용해서 데이터베이스에 접근할 때 문제가 발생하였다
에러 메시지
(node:12358) UnhandledPromiseRejectionWarning: TypeError: Class constructor Model cannot be invoked without 'new'
at new user (/Users/ssong/Desktop/Code States/Full_IM_Course/Project_First_Trollo/Trollo-server/src/db/models/user.ts:24:42)
에러 핸들링 방법
sequelize Model을 typescript로 작성하였기에 typescript의 옵션 부분(tsconfig.json)을 수정해주어야 한다
어떤 에러인가요?
findOne()
,create()
등의 함수를 사용해서 데이터베이스에 접근할 때 문제가 발생하였다에러 메시지
(node:12358) UnhandledPromiseRejectionWarning: TypeError: Class constructor Model cannot be invoked without 'new' at new user (/Users/ssong/Desktop/Code States/Full_IM_Course/Project_First_Trollo/Trollo-server/src/db/models/user.ts:24:42)
에러 핸들링 방법
tsconfig.json
)을 수정해주어야 한다에러 핸들링을 위해 참고한 레퍼런스 링크
Class constructor Model cannot be invoked without 'new' and how getter v4 work?
The text was updated successfully, but these errors were encountered: