【问题标题】:Ensure that Node.js is installed and can be found in one of the PATH directories确保 Node.js 已安装并且可以在 PATH 目录之一中找到
【发布时间】: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


【解决方案1】:

添加用户 npm 路径。例如:C:\Users\User\AppData\Roaming\npm (Win 10)。

【讨论】:

    【解决方案2】:

    将网站发布到另一个端口后,它运行得很漂亮

    【讨论】:

      猜你喜欢
      • 2020-04-09
      • 2022-11-17
      • 2022-09-30
      • 2014-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-31
      相关资源
      最近更新 更多