I am trying to get Node.js to build on Windows. The process completes, seemingly okay, but does not generate node.lib.
Checking what was output it seems there is an issue right at the start (I disappeared off to get a coffee why I didn't see it at first) when trying to build.
Project files generated.
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
node_js2c
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(1
51,5): error MSB6006: "cmd.exe" exited with code 1. [D:\dev\AccountsX\node-v0.1
0.12\node_js2c.vcxproj]
Checking the generated project code for node_js2c.vcxproj I can see this line:
<Command>call call C:\Program Files\Python27\python.exe "tools\js2c.py" ... </Command>
Which looks wrong on two counts. First the two call commands and then the unquoted path.
How do I fix this?
So I changed the node_js2c.vcxproj removing the additional call and placing quotes around the call to python.exe. I then rebuilt it bypassing the building of project files:
vcbuild.bat noprojgen
This built the required libs.
Really this should be pushed as a patch but I am unfamiliar with the using of Python to build project files.
File node_js2c.vcxproj is auto-generated, so your fixes will disappear next build. Better solution is to reinstall Python to "C:\Programs\Python27\" or just move Python folder to this location (or any location without spaces in path). Also you need to fix environment variables: PATH, PYTHON, PYTHONPATH according to new Python location.