【发布时间】:2017-12-18 17:49:27
【问题描述】:
我在 IIS 上托管我的 asp.net 核心时收到以下错误。在本地运行良好:
Win32Exception: The system cannot find the file specified
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
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:\Program Files (x86)\PHP\v5.6;C:\Windows\system32\inetsrv;C:\Program Files (x86)\PHP\v5.6;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;S:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;S:\Program Files\Microsoft SQL Server\130\Tools\Binn\;S:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;S:\Program Files\Microsoft SQL Server\130\DTS\Binn\;S:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;S:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;S:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files\dotnet\;C:\Program Files\Microsoft\Web Platform Installer\;; 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. Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo)
Stack Query Cookies Headers Win32Exception: The system cannot find the file specified System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) System.Diagnostics.Process.Start() System.Diagnostics.Process.Start(ProcessStartInfo startInfo) Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.LaunchNodeProcess(ProcessStartInfo startInfo)
有人可以提示我修复它吗?
【问题讨论】:
-
你安装了 node.js 吗?在命令行中运行
node --version会发生什么? -
我同意@jakerella。正如您收到的错误消息所说,您要么没有安装节点 (nodejs.org/en),要么没有设置指向它的 PATH 变量。
标签: asp.net node.js angular asp.net-core