为了学习Angular 2,我正在尝试他们的教程.
我收到这样的错误:
(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.
Run Code Online (Sandbox Code Playgroud)
我在SO中经历了不同的问题和答案,但无法找出"未处理的承诺拒绝"是什么.
任何人都可以简单地解释一下它是什么Error: spawn cmd ENOENT
,也是什么,当它出现时,我必须检查以摆脱这个警告?
可以通过加载的 Zone.js 以某种方式访问无区域window
方法(setTimeout
等)吗?Zone.js 是否公开了原始未修补的方法?
可能用例的示例是 Angular 2 应用程序,它在 Angular 2 Material 数据绑定方面存在一些问题,需要调用 un-zonedsetTimeout
作为临时但即时的解决方法 - 在问题得到正确修复之前。