Skip to content

Commit a881ca5

Browse files
Correctly set NODE_PATH when starting OutOfProcessNodeInstance
1 parent 3fc19ea commit a881ca5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ protected async Task EnsureReady()
9191

9292
var nodePathValue = existingNodePath + Path.Combine(_projectPath, "node_modules");
9393
#if NET451
94-
startInfo.EnvironmentVariables.Add("NODE_PATH", nodePathValue);
94+
startInfo.EnvironmentVariables["NODE_PATH"] = nodePathValue;
9595
#else
96-
startInfo.Environment.Add("NODE_PATH", nodePathValue);
96+
startInfo.Environment["NODE_PATH"] = nodePathValue;
9797
#endif
9898

9999
_nodeProcess = Process.Start(startInfo);

0 commit comments

Comments
 (0)