【发布时间】:2020-03-02 10:50:05
【问题描述】:
问题
我通过 asp.net core 2.2 制作 web API,并通过 post man 测试成功。
之后我打开 Visual Studio 代码并打开我的 Angular 7 项目以查看我的 Web API 结果
但是 Angular 7 编译成功但浏览器无法打开的问题项目
查看我的 Web API 结果
编译成功后给我这些错误
我在终端上写
ng 服务 -o
它给我的结果如下
i 「wdm」: Compiled successfully.
(node:8000) UnhandledPromiseRejectionWarning: Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:8000) 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:8000) [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.
请问如何解决此错误以在浏览器上查看我的结果?
实际上我需要解决上面的错误,因为它阻止了我 在浏览器上查看 Angular 项目的结果。
我尝试升级到 Angular 8,但这并不能解决我的问题
终端上的 npm 更新也不能解决我的问题
【问题讨论】:
标签: angular typescript angular7 angular-components