【发布时间】:2021-12-13 20:45:31
【问题描述】:
这是我的第一个 Angular 项目。我可以运行“npm start”,它启动时没有错误。以下是我从 Visual Studio 运行应用程序时当前遇到的错误。看起来它发送相同的命令,但我每次都会收到这 2 个“失败”错误。它打开浏览器,什么也不做。
信息:Microsoft.Hosting.Lifetime[0] 现在收听:https://localhost:5001
信息:Microsoft.Hosting.Lifetime[0] 现在收听:http://localhost:5000
信息:Microsoft.Hosting.Lifetime[0] 申请开始。按 Ctrl+C 关闭。
信息:Microsoft.Hosting.Lifetime[0] 托管环境:开发
信息:Microsoft.Hosting.Lifetime[0] 内容根路径:C:\Users\CF135238\source\repos\COT.DEV.Forf\Forf
失败:Microsoft.AspNetCore.SpaServices[0] (node:7664) [DEP0111] DeprecationWarning: 访问 process.binding('http_parser') 已弃用。
失败:Microsoft.AspNetCore.SpaServices[0] (使用
node --trace-deprecation ...显示警告的创建位置)
【问题讨论】:
-
您必须使用 IIS Express 配置文件启动调试程序。并且无需自己运行
npm start。 Web 应用程序会为您执行此操作。 -
我明白这一点 - 但是当我从 IISExpress 运行时,我收到了我发布的错误。如果我手动运行 npm start ,则 CLI 没有错误。