系统聚合异常:无法启动节点进程 [英] System Aggregation Exception : Failed to start Node Process

查看:77
本文介绍了系统聚合异常:无法启动节点进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I,我已经使用vs2017在Mac OS中创建了一个角度应用程序,并遵循了示例表格







试图解决此链接中的错误

解决方案



https://github.com/aspnet/JavaScriptServices/issues/1534#issuecomment-366605094



修改了角度应用docker文件



更改此行

  FROM microsoft / aspnetcore:2.0 AS base 

  FROM microsoft / aspnetcore-build:2.0 AS base 

更新的Docker文件

 从Microsoft / aspnetcore-build:2.0 AS基础
WORKDIR / app
暴露80

从microsoft / aspnetcore-build:2.0 AS构建
WORKDIR / src
COPY MeroRental.sln ./
COPY WebApp / WebApp.csproj WebApp /
运行dotnet restore -nowarn:msb3202,nu1503
COPY。 。
WORKDIR / src / WebApp
RUN dotnet build -c Release -o / app

FROM build AS发布
RUN dotnet publish -c Release -o / app

从基础AS最终
WORKDIR / app
COPY --from = publish / app。
ENTRYPOINT [ dotnet, WebApp.dll]


I, have create a angular app in mac os using vs2017 and followed the sample form Creating a new Angular project on Mac with Visual Studio with docker support for three project. Since the other project are Web API. Since the other project are successfully running on the docker. However only the angular app is not running and it throw an error as below

System.AggregateException: "One or more errors occurred. (Failed to start Node process. To resolve this:.\n\n[1] Ensure that Node.js is installed and can be found in one of the PATH directories.\n    Current PATH enviroment variable is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n    Make sure the Node executable is in one of those directories, or update your PATH.\n\n[2] See the InnerException for further details of the cause.)" ---> System.Exception {System.InvalidOperationException}: "Failed to start Node process. To resolve this:.\n\n[1] Ensure that Node.js is installed and can be found in one of the PATH directories.\n    Current PATH enviroment variable is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n    Make sure the Node executable is in one of those directories, or update your PATH.\n\n[2] See the InnerException for further details of the cause." ---> System.Exception {System.ComponentModel.Win32Exception}: "No such file or directory"
  at at System.Diagnostics.Process.ResolvePath(String filename)\n   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)\n   at System.Diagnostics.Process.Start()\n   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)\n   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo)
  --- End of inner exception stack trace ---
  at at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo)\n   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance..ctor(String entryPointScript, String projectPath, String[] watchFileExtensions, String commandLineArguments, CancellationToken applicationStoppingToken, ILogger nodeOutputLogger, IDictionary`2 environmentVars, Int32 invocationTimeoutMilliseconds, Boolean launchWithDebugging, Int32 debuggingPort)\n   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance..ctor(NodeServicesOptions options, Int32 port)\n   at Microsoft.AspNetCore.NodeServices.HostingModels.NodeServicesOptionsExtensions.<>c__DisplayClass0_0.<UseHttpHosting>b__0()\n   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.CreateNewNodeInstance()\n   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.GetOrCreateCurrentNodeInstance()\n   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
  --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\n   at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)\n   at WebApp.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in /Users/macbook/Projects/MeroRental/WebApp/Startup.cs:line 34\n--- End of stack trace from previous location where exception was thrown ---\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)\n   at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)\n   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()\n   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()\n   at WebApp.Program.BuildWebHost(String[] args) in /Users/macbook/Projects/MeroRental/WebApp/Program.cs:line 21\n   at WebApp.Program.Main(String[] args) in /Users/macbook/Projects/MeroRental/WebApp/Program.cs:17

Tried to solve the error from this link https://github.com/aspnet/JavaScriptServices/issues/707 but no result.

解决方案

Found the solution from this link and it worked.

https://github.com/aspnet/JavaScriptServices/issues/1534#issuecomment-366605094

modified the angular app docker file

change this line

FROM microsoft/aspnetcore:2.0 AS base

to

FROM microsoft/aspnetcore-build:2.0 AS base

Updated Docker file

FROM microsoft/aspnetcore-build:2.0 AS base
WORKDIR /app
EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY MeroRental.sln ./
COPY WebApp/WebApp.csproj WebApp/
RUN dotnet restore -nowarn:msb3202,nu1503
COPY . .
WORKDIR /src/WebApp
RUN dotnet build -c Release -o /app

FROM build AS publish
RUN dotnet publish -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "WebApp.dll"]

这篇关于系统聚合异常:无法启动节点进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆