我正在使用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
这样它被添加到路径.
代码中的任何内容都没有改变,因为它上次工作,只有我的电脑.有谁知道什么可能是错的?
调试后我发现它是由于丢失文件夹.
这是如何NodeServices
配置Startup.cs
:
services.AddNodeServices(options =>
{
options.ProjectPath = "Path\That\Doesnt\Exist";
});
Run Code Online (Sandbox Code Playgroud)
一旦我添加了这条路径,一切都运行正常.
归档时间: |
|
查看次数: |
8869 次 |
最近记录: |