Checking the Node.js License, it appears that it is MIT licensed, so it's perfectly legal to do so.
I'm assuming you're targeting Windows or Mac, since on Linux you could just release a package that depends on Node.js of a particular version, and provide a script to add one of the various free repositories for .deb
or .rpm
pre-compiled versions of Node.js.
You'll need to get the source for the version you're interested in and build it for your platform of choice. As I recall, the built executable can be run directly without being installed, but it assumes certain libraries are available on the $PATH
(OpenSSL being the one they're explicitly mentioning in the license as liked instead of statically compiled into the binary).
Reading the Visual Studio build script, it looks like you'll need Python to be installed for Windows to build the .exe
. I suspect (but don't know for sure) that the executable is essentially stand-alone for Windows, so you can bundle your Javascript code with it and write a simple batch file to get it running on that platform. I have no idea how to make a Windows .msi
installer, but the vcbuild.bat file also includes the ability to generate one, so you could just piggyback on their code to do it.