From a881ca5b96e1c2d8253bb1c4cd18c42e8b0a1d8e Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Tue, 14 Jun 2016 10:43:03 +0100 Subject: [PATCH] Correctly set NODE_PATH when starting OutOfProcessNodeInstance --- .../HostingModels/OutOfProcessNodeInstance.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs b/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs index 1a8a5e1..296bb48 100644 --- a/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs +++ b/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs @@ -91,9 +91,9 @@ namespace Microsoft.AspNetCore.NodeServices var nodePathValue = existingNodePath + Path.Combine(_projectPath, "node_modules"); #if NET451 - startInfo.EnvironmentVariables.Add("NODE_PATH", nodePathValue); + startInfo.EnvironmentVariables["NODE_PATH"] = nodePathValue; #else - startInfo.Environment.Add("NODE_PATH", nodePathValue); + startInfo.Environment["NODE_PATH"] = nodePathValue; #endif _nodeProcess = Process.Start(startInfo);