【发布时间】:2019-04-26 20:36:03
【问题描述】:
我已经在我的 PC 上安装了 Docker - Docker Desktop - 并在 Azure Devops 中为我的 SPA (Aurelia) 创建了一个 git 存储库。我发现我有,而不是 IISExpress 来运行项目,我有“Docker”。我单击“Docker”运行它,它一直运行,然后我得到以下异常。似乎很简单,我的路径中没有node.js,除了它是......系统变量。然后我删除了所有条目并重新安装了 Node.. 然后将节点添加到路径本身。然后我重新启动并再次重新运行项目 - 首先在 IISExpress 中 - 成功 - 然后在 Docker 中,你可以再次看到异常。我不知道为什么当 Node 在机器上和路径中并且它仍然抛出例外??
System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Failed to start Node process. To resolve this:.
[1] Ensure that Node.js is installed and can be found in one of the PATH directories.
Current PATH enviroment variable is: C:\Windows\system32;C:\Windows;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\dotnet;C:\Users\ContainerUser\AppData\Local\Microsoft\WindowsApps
Make sure the Node executable is in one of those directories, or update your PATH.
[2] See the InnerException for further details of the cause.)
Source=System.Private.CoreLib
StackTrace:
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
at JobsLedgerAPI.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\AURELIA\1. - JOBSLEDGER SPA\JobsLedgerSPA\JobsLedgerAPI\Startup.cs:line 44
Inner Exception 1:
InvalidOperationException: Failed to start Node process. To resolve this:.
[1] Ensure that Node.js is installed and can be found in one of the PATH directories.
Current PATH enviroment variable is: C:\Windows\system32;C:\Windows;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\dotnet;C:\Users\ContainerUser\AppData\Local\Microsoft\WindowsApps
Make sure the Node executable is in one of those directories, or update your PATH.
[2] See the InnerException for further details of the cause.
Inner Exception 2:
Win32Exception: The system cannot find the file specified
【问题讨论】: