Microsoft.AspNetCore.NodeServices:无法启动节点进程

Joe*_*oel 5 asp.net-core

我正在使用Microsoft.AspNetCore.NodeServices 1.1.1我的ASP.Net Core应用程序.一切都工作正常,但现在我在一台新电脑上,我收到以下错误:

System.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: ....
    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.
Run Code Online (Sandbox Code Playgroud)

我已从此问题中删除了路径变量,但其中列出了安装Node的目录.

node -v在终端给我v6.11.0这样它被添加到路径.

代码中的任何内容都没有改变,因为它上次工作,只有我的电脑.有谁知道什么可能是错的?

Joe*_*oel 7

调试后我发现它是由于丢失文件夹.

这是如何NodeServices配置Startup.cs:

services.AddNodeServices(options =>
{
    options.ProjectPath = "Path\That\Doesnt\Exist";
});
Run Code Online (Sandbox Code Playgroud)

一旦我添加了这条路径,一切都运行正常.