آموزش جاوااسکریپت انجمن ها Nodejs خطا در جلسه 12 دوره آموزشی

برچسب ها: 

  • این موضوع 1 پاسخ، 2 کاربر را دارد و آخرین بار در 2 سال، 5 ماه پیش بدست علی به‌روزرسانی شده است.
در حال نمایش 2 نوشته (از کل 2)
  • نویسنده
    نوشته‌ها
  • #53908 پاسخ
    mrwebkar
    مشارکت کننده

    سلام توی جلسه 12 اگه دقیقه 22 رو اگه نگاه بکنید توی کنسول خطایی دارید که برای منم نشون میده
    در خصوص این خطا و علت بروزش ممنون میشم راهنمائیم بکنید
    (node:5740) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (_http_outgoing.js:558:11)
    at ServerResponse.header (C:\Users\Web\Desktop\app\node_modules\express\lib\response.js:771:10)
    at ServerResponse.location (C:\Users\Web\Desktop\app\node_modules\express\lib\response.js:888:15)
    at ServerResponse.redirect (C:\Users\Web\Desktop\app\node_modules\express\lib\response.js:926:18)
    at authController.savekon (C:\Users\Web\Desktop\app\app\http\controllers\authController.js:28:17)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    (node:5740) 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: 1)
    (node:5740) [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.

    #54671 پاسخ
    علی
    مشارکت کننده

    سلام وقت بخیر
    این خطا معمولا به این دلیل رخ میده که بیش از یک بار response اتفاق میفته حتما در جلسات بعد از این برطرف شده

در حال نمایش 2 نوشته (از کل 2)
پاسخ به: خطا در جلسه 12 دوره آموزشی
اطلاعات شما: