我学习了这教程中关于如何让running和ASP.NET Core一起运行的教程。初始构建运行良好,但是在更新了角包之后,我在应用程序启动时收到了以下错误(我还必须在此过程中重新安装nodejs,不确定这是否相关):
错误出现在以下一行:
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
HotModuleReplacement = true
});


错误本身并没有为我提供任何有用的信息来追踪问题。
我得到了一个:
System.AggregateException => Count = error CS0103:名称'InnerExceptionCount‘在当前上下文中不存在
在InnerExceptions下,它列出了以下错误:
System.Diagnostics.Process.StartCore(ProcessStartInfo :系统找不到在System.ComponentModel.Win32Exception startInfo( System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start startInfo) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo)在Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance..ctor(String entryPointScript、String projectPath、String[] watchFileExtensions、String commandLineArguments、ILogger nodeOutputLogger、IDictionary2 IDictionary2、IDictionary2、Boolean,( Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance..ctor(String projectPath,String[] watchFileExtensions,ILogger nodeInstanceOutputLogger,IDictionary2 environmentVars,Int32 invocationTimeoutMilliseconds,Boolean,Int32 debuggingPort,( Microsoft.AspNetCore.NodeServices.NodeServicesFactory.CreateNodeInstance(NodeServicesOptions options)在Microsoft.AspNetCore.NodeServices.NodeServicesFactory.<>c__DisplayClass0_0.b__0() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.CreateNewNodeInstance() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.GetOrCreateCurrentNodeInstance() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.d__10`1.MoveNext()}
如果有人能指点我的方向,从错误中获得更多的信息将是有帮助的。
发布于 2016-12-20 21:24:02
看来它找不到node.exe了。在第一次安装Node之后,我看到了同样的错误。这是因为安装Node修改了系统路径,而IIS没有选择新路径。我必须重新启动我的服务器,然后它能够找到节点exe。
发布于 2017-11-27 12:40:47
检查是否安装了最新的NPM。这解决了我的问题。
https://stackoverflow.com/questions/41244137
复制相似问题