You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Change error "The system cannot find the file specified" to "Cannot find Node executable" for clarity #527
I have followed this tutorial on getting angular and ASP.NET Core running together. The initial build worked fine but after updating angular packages I am receiving the following error on startup of the application(I also had to reinstall nodejs in the process, not sure if this is related):
System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance..ctor(String entryPointScript, String projectPath, String[] watchFileExtensions, String commandLineArguments, ILogger nodeOutputLogger, IDictionary2 environmentVars, Int32 invocationTimeoutMilliseconds, Boolean launchWithDebugging, Int32 debuggingPort) at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance..ctor(String projectPath, String[] watchFileExtensions, ILogger nodeInstanceOutputLogger, IDictionary2 environmentVars, Int32 invocationTimeoutMilliseconds, Boolean launchWithDebugging, Int32 debuggingPort, Int32 port) at Microsoft.AspNetCore.NodeServices.NodeServicesFactory.CreateNodeInstance(NodeServicesOptions options) at 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()}
Is there any way of getting more information from this error?
It looks like it is unable to find node.exe. I saw the same error after installing Node for the first time. It was because installing Node modified the system Path and the new Path wasn't getting picked up by IIS. I had to reboot my server and it was then able to find the node exe.
Minimal reproduction of the problem with instructions:
Backup your node.exe file located in C:\Program Files\nodejs
Delete your node.exe file located in C:\Program Files\nodejs
Run your ASP.NET Core application
Expect the following error in Startup.cs
An exception of type 'System.AggregateException' occurred in System.Private.CoreLib.ni.dll but was not handled in user code
Additional information: One or more errors occurred.
@SteveSandersonMS Can we please update the error to say something like:
Node.exe could not be found. Please make sure you have node.js installed.
changed the title [-]ASP.NET Core The system cannot find the file specified[/-][+]Change error "The system cannot find the file specified" to "Cannot find Node executable" for clarity[/+]on Jan 2, 2017
Activity
LovedByTheLord commentedon Dec 20, 2016
It looks like it is unable to find node.exe. I saw the same error after installing Node for the first time. It was because installing Node modified the system Path and the new Path wasn't getting picked up by IIS. I had to reboot my server and it was then able to find the node exe.
tjaartvanderWalt commentedon Dec 21, 2016
Thanks after I restarted my PC all worked again.
Minimal reproduction of the problem with instructions:
Startup.cs@SteveSandersonMS Can we please update the error to say something like:
SteveSandersonMS commentedon Jan 2, 2017
Yep, will change that error message. Thanks for reporting it!
[-]ASP.NET Core The system cannot find the file specified[/-][+]Change error "The system cannot find the file specified" to "Cannot find Node executable" for clarity[/+]