【问题标题】:error display after compile successfully prevent show result view on browser on angular 7 project?编译成功后错误显示阻止在 Angular 7 项目的浏览器上显示结果视图?
【发布时间】: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


    【解决方案1】:

    此错误与Angular 无关,在端口8000 上运行的Node.js 应用程序记录了此错误。

    【讨论】:

    • 谢谢你的回复你能告诉我如何记录错误或节点的哪个文件保存日志我不能做任何事情如果可能的话项目不运行你能帮我吗
    • 如果我的回答有帮助,请考虑接受我的回答。
    • 我不确定你想要什么。你能说得更具体一点吗?
    • 如何获取该问题的原因以及何时跟踪问题的日志文件这是一个模棱两可的问题
    猜你喜欢
    • 1970-01-01
    • 2012-05-07
    • 2017-11-14
    • 2018-12-15
    • 2016-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-09
    相关资源
    最近更新 更多