Node.js应用程序运行错误

时间:2019-01-16 05:23:39

标签: node.js deployment tcp unhandled-exception issue-tracking

在我的本地PC上,该应用程序可以正常运行,没有任何错误。但是,当我在服务器上运行它时,会显示那些错误。 :-(

(node:3100) UnhandledPromiseRejectionWarning: Error: read ECONNRESET
    at _errnoException (util.js:992:11)
    at TCP.onread (net.js:618:25)
(node:3100) 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(). (rejection id: 1)
(node:3100) [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.

1 个答案:

答案 0 :(得分:0)

我想您正在服务器上使用本地PC上的另一个(较旧)版本的nodejs。您应该考虑处理应许中可能引发的任何错误,因为它可能会杀死节点的未来版本中的整个过程。

我假设没有侦听“错误”的信息,但我可以告诉您是否可以透露代码。