Nw.js: SQLite Build not working

Created on 30 May 2016  路  24Comments  路  Source: nwjs/nw.js

Currently using the 0.15.0 SDK version.

Ive created an app for a customer a few months ago with Knex and Bookshelf ORM and it was a pretty good way to do the queries and fast development times. Now i have another app to do, but this one needs a SQLite3 because is not an centrilized DB.

The problem is that Knex crashed the app with the sqlite3 driver, and if i try to run the sqlite3 directly it cannot be found.

I tried building the version like the npm sqlite documents says, but it gives a tons of errors. Im not posting the error of tring to build it because its a pretty long long long file. If i try to bild it for the 0.12.3 i think it builds it? But im still having problems so, i cannot make it run.

If you guys want me to post the error ill add it. Thank you very much guys!

All 24 comments

How did you build the sqlite node module?

I've tried:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.15.0
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.15.0 --save
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.15.0
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.15.0 --save

but this one:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.12.3
get it build, but knex is still crashing, and sqlite directly still not working.

This is a error that i got if i try to use Sqlite3 directly without knex and bookshelf:

module.js:460 Uncaught Error: Cannot find module 'C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64\node_sqlite3.node'

@Hectorhammett the problem with sqlite3 node module that each time you install any module npm rebuild it, i think this is a bug. anyway. Can you try the following:
1- install knex & bookshelf
2- install sqlite3 (make sure you install it after knex and bookshelf) using:
NODE_WEBKIT_VERSION=0.15.0 npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.15.0
3- goto node_modules/sqlite3/package.json and delete all the following fields:
"_args": {...}
"scripts":{....}
"_where": "..."
"dependencies":{...}
"bundleDependencies": [...]
4- delete the files binding.gyp & appveyor.yml
and let me know what do you got

@digital-flowers I cant run
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.15.0

It gives a bunch of errors. I tried to put the stack in a comment but Chrome started to lag because it's a really really long stack.

Also i forgot to say, currently im working on windows, and the app is probably gonna be used on windows mostly.

did you remove the module before trying to install it again
if npm uninstall didn't work just go and delete the folder, also remove it from your app package.json then try again

Yes, i did that, and it's giving me an error on building the module. You want me to post the Stack?

yes please

but also make sure you have node js 6 if you want to use nwjs 0.15

Yes, i have Node 6.2.0

[email protected] install C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3
node-pre-gyp install --fallback-to-build

C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
(node:5624) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5624) DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.
(node:7792) DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
unpack_sqlite_dep
sqlite3.c
sqlite3.vcxproj -> C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\Release\sqlite3.lib
database.cc
node_sqlite3.cc
statement.cc
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(343): error C2988: unrecognizable template declaration/definition (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrector
ia\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(343): error C2059: syntax error : 'using' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\
build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(479): error C2988: unrecognizable template declaration/definition (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrector
ia\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(479): error C2059: syntax error : 'using' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\
build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(590): error C2061: syntax error : identifier 'WeakCallbackType' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria
\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(670) : see reference to class template instantiation 'v8::PersistentBase' being compiled
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(665): error C2253: 'PersistentBase' : pure specifier or abstract override specifier only allowed on virtual function (..\s
rc\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(872): error C2253: 'Global' : pure specifier or abstract override specifier only allowed on virtual function (..\src\state
ment.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(875) : see reference to class template instantiation 'v8::Global' being compiled
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(880): error C2988: unrecognizable template declaration/definition (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrector
ia\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(880): error C2059: syntax error : 'using' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\
build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(943): error C2989: 'v8::HandleScope' : class template has already been declared as a non-class template (..\src\statement.cc)
[C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(328) : see declaration of 'v8::HandleScope'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(977): error C2989: 'v8::EscapableHandleScope' : class template has already been declared as a non-class template (..\src\stat
ement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(139) : see declaration of 'v8::EscapableHandleScope'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(1007): error C2989: 'v8::Data' : class template has already been declared as a non-class template (..\src\statement.cc) [C:\U
sers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(76) : see declaration of 'v8::Data'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(1141): error C2989: 'v8::Script' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(99) : see declaration of 'v8::Script'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(1580): error C2989: 'v8::StackTrace' : class template has already been declared as a non-class template (..\src\statement.cc)
[C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(104) : see declaration of 'v8::StackTrace'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(1643): error C2989: 'v8::StackFrame' : class template has already been declared as a non-class template (..\src\statement.cc)
[C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(103) : see declaration of 'v8::StackFrame'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2058): error C2989: 'v8::Value' : class template has already been declared as a non-class template (..\src\statement.cc) [C:\
Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(112) : see declaration of 'v8::Value'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2064): error C2989: 'v8::Primitive' : class template has already been declared as a non-class template (..\src\statement.cc)
[C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(95) : see declaration of 'v8::Primitive'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2079): error C2989: 'v8::Boolean' : class template has already been declared as a non-class template (..\src\statement.cc) [C
:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(72) : see declaration of 'v8::Boolean'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2099): error C2989: 'v8::Name' : class template has already been declared as a non-class template (..\src\statement.cc) [C:\U
sers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(88) : see declaration of 'v8::Name'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2467): error C2989: 'v8::String' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(105) : see declaration of 'v8::String'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2506): error C2989: 'v8::Symbol' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(107) : see declaration of 'v8::Symbol'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2534): error C2989: 'v8::Private' : class template has already been declared as a non-class template (..\src\statement.cc) [C
:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(109) : see declaration of 'v8::Private'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2548): error C2989: 'v8::Number' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(89) : see declaration of 'v8::Number'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2563): error C2989: 'v8::Integer' : class template has already been declared as a non-class template (..\src\statement.cc) [C
:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(84) : see declaration of 'v8::Integer'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2577): error C2989: 'v8::Int32' : class template has already been declared as a non-class template (..\src\statement.cc) [C:\
Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(83) : see declaration of 'v8::Int32'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(2591): error C2989: 'v8::Uint32' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(110) : see declaration of 'v8::Uint32'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3013): error C2989: 'v8::Object' : class template has already been declared as a non-class template (..\src\statement.cc) [C:
\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(91) : see declaration of 'v8::Object'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3043): error C2989: 'v8::Array' : class template has already been declared as a non-class template (..\src\statement.cc) [C:\
Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(71) : see declaration of 'v8::Array'
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3241): error C2504: 'v8::Object' : base class undefined (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_mo
dules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3248): error C2061: syntax error : identifier 'FunctionCallback' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectori
a\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3254): error C2061: syntax error : identifier 'FunctionCallback' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectori
a\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3264): error C2059: syntax error : 'return' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite
3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3264): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3269): error C2146: syntax error : missing ';' before identifier 'Call' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicer
rectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3275): error C2270: 'GetName' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Documents\
vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3283): error C2270: 'GetInferredName' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Do
cuments\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3289): error C2270: 'GetDebugName' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Docum
ents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3295): error C2270: 'GetDisplayName' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Doc
uments\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3301): error C2270: 'GetScriptLineNumber' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hect
o\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3306): error C2270: 'GetScriptColumnNumber' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\He
cto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3311): error C2270: 'IsBuiltin' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Document
s\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3316): error C2270: 'ScriptId' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Documents
\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3322): error C2270: 'GetBoundFunction' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\D
ocuments\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3324): error C2270: 'GetScriptOrigin' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Do
cuments\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3328): error C2059: syntax error : 'private' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlit
e3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3329): error C2059: syntax error : ')' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\bui
ld\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3338): error C2504: 'Object' : base class undefined (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_module
s\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3340): error C2504: 'Object' : base class undefined (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_module
s\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3346): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3346): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3346): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3347): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3347): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3348): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3353): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3353): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3353): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3359): error C2061: syntax error : identifier 'Local' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3361): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3361): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3361): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3363): error C2061: syntax error : identifier 'Local' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3365): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3365): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3365): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3367): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3371): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3381): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3381): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3381): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3384): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto\Documents\vicerrectoria\node_modules\nan\nan.h(72): fatal error C1060: compiler is out of heap space (..\src\database.cc) [C:\Users\Hecto\Documents\vicerrectoria
\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto\Documents\vicerrectoria\node_modules\nan\nan.h(72): fatal error C1060: compiler is out of heap space (..\src\node_sqlite3.cc) [C:\Users\Hecto\Documents\vicerrect
oria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3384): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3384): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3387): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3387): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3387): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3388): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3388): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3389): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3392): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3392): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3392): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3393): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3393): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3394): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3402): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3406): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3414): error C2504: 'Object' : base class undefined (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_module
s\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3416): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3416): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3416): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3417): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3417): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3417): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3424): error C2143: syntax error : missing ';' before '<' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3424): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3426): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3428): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3432): error C2061: syntax error : identifier 'Value' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3449): error C2504: 'Object' : base class undefined (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_module
s\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3466): error C2628: 'ArrayBuffer::Allocator' followed by 'void' is illegal (did you forget a ';'?) (..\src\statement.cc) [C:\
Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C3861: 'data_': identifier not found (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\
sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C2461: 'Contents' : constructor syntax missing formal parameters (..\src\statement.cc) [C:\Users\Hecto\Documents
\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C2059: syntax error : 'constant' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqli
te3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C2143: syntax error : missing ';' before '{' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3492): error C2334: unexpected token(s) preceding '{'; skipping apparent function body (..\src\statement.cc) [C:\Users\Hecto\
Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3494): error C2059: syntax error : 'return' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite
3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3494): error C2238: unexpected token(s) preceding ';' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3495): error C2146: syntax error : missing ';' before identifier 'ByteLength' (..\src\statement.cc) [C:\Users\Hecto\Documents
\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3495): error C2270: 'ByteLength' : modifiers not allowed on nonmember functions (..\src\statement.cc) [C:\Users\Hecto\Documen
ts\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3495): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (..\src\statement.cc) [C:\Us
ers\Hecto\Documents\vicerrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3495): error C2065: 'byte_length_' : undeclared identifier (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node
_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3497): error C2059: syntax error : 'private' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlit
e3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3501): error C2255: 'friend' : not allowed outside of a class definition (..\src\statement.cc) [C:\Users\Hecto\Documents\vice
rrectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3502): error C2059: syntax error : '}' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\bui
ld\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3502): error C2143: syntax error : missing ';' before '}' (..\src\statement.cc) [C:\Users\Hecto\Documents\vicerrectoria\node_
modules\sqlite3\build\node_sqlite3.vcxproj]
C:\Users\Hecto.nw-gyp\0.15.0\deps\v8\include\v8.h(3502): fatal error C1003: error count exceeds 100; stopping compilation (..\src\statement.cc) [C:\Users\Hecto\Documents\vicer
rectoria\node_modules\sqlite3\build\node_sqlite3.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Hecto\AppData\Roaming\npm\node_modules\nw-gyp\lib\build.js:286:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Hecto\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64"
gyp ERR! cwd C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3
gyp ERR! node -v v6.2.0
gyp ERR! nw-gyp -v v0.13.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'nw-gyp.cmd build --fallback-to-build --module=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Windows_NT 10.0.10586
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3
node-pre-gyp ERR! node -v v6.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
Failed to execute 'nw-gyp.cmd build --fallback-to-build --module=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Hecto\Documents\vicerrectoria\node_modules\sqlite3\lib\binding\node-webkit-v0.15.0-win32-x64' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "sqlite3" "--build-from-source" "--runtime=node-webkit" "--target_arch=x64" "--target=0.15.0"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Hecto\Documents\vicerrectoria\npm-debug.log

@digital-flowers There it is man.

sorry since i didn't tried it in windows yet i can't help you now, anyway i think this is sqlite3 module problem and nothing todo with nw.js so i suggest you to post it here: https://github.com/mapbox/node-sqlite3/issues or stackoverflow.com.
just final suggestion: you may try manually to replace src/statment.cc and src/statement.h with the following files:
1- https://github.com/mapbox/node-sqlite3/blob/master/src/statement.cc
2- https://github.com/mapbox/node-sqlite3/blob/master/src/statement.h
and run npm rebuild sqlite3

@Hectorhammett now we support native modules built for Node.js. nw-gyp is not maintained now.

See https://groups.google.com/d/msg/nwjs-general/UqEq8ito2gI/W-ld9LSoDQAJ
http://docs.nwjs.io/en/latest/For%20Users/Advanced/Use%20Native%20Node%20Modules/

@rogerwang I did what it says in the docs, and can't build it. I already changed the C File, i tried to run:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.15.0
And having the same stack.

I tried installing with:
npm install sqlite3 --save
And then going to the folder and running nw-gyp on there, and i have this error:
"Undefined Variable module_name" in binding.gyp.

In all honesty i'm not sure if i'm doing something wrong.

@rogerwang @digital-flowers FINALLY made it build. I reinstalled vs2015, and added the C++ checkmark, Also, i changed some code in the MSVSVersion.py that is right here:
https://github.com/nwjs/nw.js/issues/4033

One question, this means that if i ship the app, i will have to rebuild it for each and every computer i want to install my app?

@Hectorhammett you'll need to rebuild it if it's redistributed to different kind of OS (Linux vs Win) or architectures (32bit vs 64bit).

@Hectorhammett You are lucky!i still unsuccessful,i can compile sqlite3 with electron,but can't with nwjs,can you provide detail step?

@keyiis Hey! Hello! Unfurtunatelly, it's been a long time since i did this, i don't remember, and i have the issue the other way around haha. I can't build it for electron.

As far as i remember i did what the ticket named says and i finally could add sqlite to my nwjs app.

this method works for any module
1- install and disable build scripts (because if the build failed npm will remove the module :P)
npm install sqlite3@latest --save --ignore-scripts
2- go to the module root
cd ./node_modules/sqlite3
3- build for the runtime you want
NODE_WEBKIT_VERSION=0.17.4 node-pre-gyp --runtime=node-webkit --target_arch=ia32 --target=0.17.4 configure rebuild

Note: some modules need node-gyp some need nw-gyp and others may needs node-pre-gyp this actually depends on nwjs version

@Hectorhammett aha!i already build success for electron,but fail with nwjs :(
i used node5.x build success for electron.you can try reduce the version of nodejs.

C:\Users\lisq\node_modules\sqlite3>nw-gyp rebuild --target=0.13.0 --arch=x64
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp http GET http://node-webkit.s3.amazonaws.com/v0.13.0/nw-headers-v0.13.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1026:11)
gyp ERR! stack at TCP.onread (net.js:572:26)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\lisq\AppData\Roaming\npm\node_modulesnw-gyp\binnw-gyp.js" "rebuild" "--target=0.13.0" "--arch=x64"
gyp ERR! cwd C:\Users\lisq\node_modules\sqlite3
gyp ERR! node -v v7.0.0
gyp ERR! nw-gyp -v v3.4.0
gyp ERR! not ok

@hubbly you are building the module using nodejs version 7 can you use node version compatible with nwjs version in your case v5.9.0 if you want you can switch node versions easily using this project: https://github.com/coreybutler/nvm-windows

Was this page helpful?
0 / 5 - 0 ratings