• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

Promise error가 계속 발생되는데 구글링해도 답을 모르겠어요...

21.02.19 18:02 작성 조회수 297

0

UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

(node:5538) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

따라 작성을 했는데. 이런 에러가 뜨네요..

구글링을 해도 답이 안나와서요 ㅜ

try catch를 작성해야하는걸까요...?

혹시 이번 강의 코드는 저장된 곳 없으신가요?

답변 2

·

답변을 작성해보세요.

1

이룸님의 프로필

이룸

질문자

2021.02.22

잘 해결되었습니다! 답변 감사합니다!

1

많이 난감하셨겠네요!

https://github.com/hoffnung8493/mongodb_tutorial

소스코드가 담긴 github repository에요. 코드가 최종본이라 조금 다를 수 있어요.

만약 해결이 안되시면 github public repository에 소스코드 올려서 공유해주세요! 그러면 제가 확인해보고 알려드리겠습니다 :)