什麼是未處理的承諾拒絕? - 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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章