TooTallNate/node-gyp — Issue #34: Trouble using node-gyp to build node-sqlite3 in Windows XP
Author: lforge
Created: 2012-03-04 19:22:09+00:00
State: open

TooTallNate,

Per your request on the Google group, I am logging this issue about the problem that I run into when I use the node-gyp to try to build the node-sqlite3 module.

First off, I download the node-sqlite3 gyp branch zip files and explode them into my c:\internet_download\TooTallNate_SQLite3 folder.

I have also installed the MS Visual C++ 2010 Express version and Python v 2.7.2 for Windows.

Then I cd to this directory and type in node-gyp configure.

It appears that it successfully builds the "build" directory.

Then when I type node-gyp build, the following error shows up. I think that this has something to do with the command issues by the build script.

C:\Internet_Download\TooTallNate_SQLite3>node-gyp build
info it worked if it ends with ok
spawn C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe [ 'build/bindings.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release' ]
C:\Internet_Download\TooTallNate_SQLite3\build\bindings.sln.metaproj : error MSB4126: The specified solution configuration "Release
|MCD" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe S
olution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration
. [C:\Internet_Download\TooTallNate_SQLite3\build\bindings.sln]
ERR! Error: `C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
at Array.0 (C:\Documents and Settings\\Application Data\npm\node_modules\node-gyp\lib\build.js:139:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok

However, when I manually issue the msbuild command with the following command line, it appears that it builds successfully because it does generate the "Release" directory under the "build" directory. In the "Release" directory, it shows node_sqlite3.node, node_sqlite3.lib

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build/bindings.sln /verbosity:m /
nologo /p:Configuration=Release;Platform="win32"

Perhaps the first parameter /clp:Verbosity=minimal may need to be read as /verbosity:minimal instead.
Then the /p:Configuration=Release needs to be /p:Configuration=Release;Platform="win32" or Platform="Any CPU". In the bindings.sln file, it seems to specify Win32 in it.

Granted, I am not a msbuild person nor I am a platform build type person. But it seems to work to finish the build.

Hope this helps. Thanks.