How to use a local node.exe in a node project

Nov 25, 2014 at 8:40 AM
Hi,

I'm looking for a solution to this problem : I have a node project and I don't want to force other developers in my team to install node.js globally (I mean by the msi installer). I would like something like a node.exe "stand alone" inside of my project.
Before, in another web project, I used NCapsulate (https://www.nuget.org/packages/Ncapsulate.Node/) to achieve that. But in a node.js project, it seems that I can't have a nuget dependency (?)
Has anyone tried something like that? Is there another solution ?

Thank you for your help
Coordinator
Nov 25, 2014 at 10:44 AM
You can specify the path to node.exe in project properties (last item under the Project top-level menu).
Nov 25, 2014 at 11:45 AM
Thank you for your answer.
My question is not really about how to specify the path for node. It's more about how to install node.js in the project without having to install it on the machine by the msi installer.
One solution is just to copy the folder nodejs from Program files to the project but it feels a bit crappy. Is there a better solution ?

After that and about the path, unfortunately, I found this issue : "Allow $(ProjectDir) in paths in NTVS properties window" (https://nodejstools.codeplex.com/workitem/1533) which is another problem.
Coordinator
Nov 25, 2014 at 12:43 PM
Well, since Node is basically just node.exe, it seems that including it directly in the project as a file is not unreasonable. But yes, the lack of support for relative paths to node.exe makes it complicated. Feel free to upvote this bug!

With respect to NCapsulate, this basically boils down to NuGet support. On our side, we'd be happy to support NuGet, but unfortunately they make some assumptions about the projects, and they only specifically support .NET and C++ projects today by design - when this subject was last brought up, there was no clear use case for people using Node to want NuGet, as far as they are concerned. I would suggest filing it as a feature request in their tracker, and describing your scenario in detail to make it clear that NuGet really is useful for NTVS projects - then, hopefully, we can work with them to fully enable such support.
Marked as answer by Blandine on 11/25/2014 at 6:21 AM
Nov 25, 2014 at 1:21 PM
My question is answered, thank you :)
This is the link to nuget feature request : https://nuget.codeplex.com/workitem/4385

For now, we'll change the path for each environment.