什么是未处理的承诺拒绝? - What is an unhandled promise rejection?

问题:

For learning Angular 2, I am trying their tutorial.为了学习 Angular 2,我正在尝试他们的教程。

I am getting an error like this:我收到这样的错误:

(node:4796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (r                                                                                                     ejection id: 1): Error: spawn cmd ENOENT
[1] (node:4796) 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.

I went through different questions and answers in SO but could not find out what an "Unhandled Promise Rejection" is.我在 SO 中经历了不同的问题和答案,但找不到“未处理的承诺拒绝”是什么。

Can anyone simply explain me what it is and also what Error: spawn cmd ENOENT is, when it arises and what I have to check to get rid of this warning?任何人都可以简单地向我解释它是什么以及Error: spawn cmd ENOENT是什么,它何时出现以及我必须检查什么才能消除此警告?


解决方案:

参考一: https://stackoom.com/question/2jw1i
参考二: What is an unhandled promise rejection?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章