我已经按照this教程学习了如何让Angular和ASP.NET Core一起运行。初始构建运行良好,但在更新角度包之后,我在应用程序启动时收到以下错误(在此过程中我还必须重新安装nodejs,不确定是否与此相关):错误出现在以下行:app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true});这个错误本身并没有提供任何有用的信息来追踪这个问题。我得到了:system.aggregateexception=>count=error cs0103:名称当前上下文中不存在“innerExceptionCount”在InnerExceptions下,它列出了以下错误:system.componentmodel.win32exception:系统找不到文件在system.diagnostics.process.startcore(processstartinfo)指定startinfo)位于system.diagnostics.process.start()处system.diagnostics.process.start(process startinfo startinfo)位置Microsoft.aspnetcore.nodeservices.hostingmodels.outofprocessnodeinstance.launchnodeprocess(processstartinfostartinfo)在Microsoft.aspnetcore.nodeservices.hostingmodels.outofprocessnodeinstance..ctor(字符串entrypointscript,字符串projectpath,字符串[]watchfileextensions,string命令linearguments,ilogger nodeoutputlogger,idictionary2environmentvars,int32调用超时毫秒,布尔值启动调试,int32调试端口)在Microsoft.aspnetcore.nodeservices.hostingModels.httpnodeInstance..ctor(字符串projectpath,字符串[]watchfileextensions,iloggerNodeInstanceOutputLogger,IDictionary2环境变量,Int32调用超时毫秒,布尔启动并调试,Int32调试端口,int32端口)Microsoft.aspnetcore.nodeservices.nodeservicesfactory.createnodeinstance(nodeservices选项选项)在Microsoft.aspnetcore.nodeservices.nodeservicesfactory.c_u displayClass0_u 0.b_u 0()在Microsoft.aspnetcore.nodeservices.nodeservicesimp.createNewNodeInstance()在Microsoft.aspnetcore.nodeservices.nodeservicesimp.getorCreateCurrentNodeInstance()在Microsoft.aspnetcore.nodeservices.nodeservicesimple.d_u 10`1.moveNext()}如果有人能指点我从错误中获得更多信息,那将是有帮助的。 (adsbygoogle = window.adsbygoogle || []).push({}); 最佳答案 似乎找不到node.exe。在第一次安装node之后,我看到了同样的错误。这是因为安装节点修改了系统路径,而新路径未被IIS获取。我不得不重新启动我的服务器,然后它能够找到节点exe。 (adsbygoogle = window.adsbygoogle || []).push({});
07-25 22:49