Error installing on Windows. Maybe due to old sqlite dependency
barbalex opened this issue · comments
I am using:
- windows 10
- node v.10.1.0
I tried to install tuql:
alexa@DESKTOP-6C4V66Q C:\Users\alexa\test-tuql
$ npm i --save sqlite3
> sqlite3@4.0.1 install C:\Users\alexa\test-tuql\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
[sqlite3] Success: "C:\Users\alexa\test-tuql\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node" is installed via remote
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN test-tuql@1.0.0 No description
npm WARN test-tuql@1.0.0 No repository field.
+ sqlite3@4.0.1
added 68 packages from 48 contributors in 8.057s
[+] no known vulnerabilities found [97 packages audited]
alexa@DESKTOP-6C4V66Q C:\Users\alexa\test-tuql
$ npm i -s tuql
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
unpack_sqlite_dep
sqlite3.c
win_delay_load_hook.cc
sqlite3.vcxproj -> C:\Users\alexa\test-tuql\node_modules\tuql\node_modules\sqlite3\build\Release\\sqlite3.lib
database.cc
node_sqlite3.cc
statement.cc
win_delay_load_hook.cc
c:\users\alexa\test-tuql\node_modules\tuql\node_modules\nan\nan_maybe_43_inl.h(112): error C2039: 'ForceSet': is not a member of 'v8::Object' (compiling source file ..\src\statement.cc) [C:\Users\alexa\test-tuql\node_modules\tuql\node_modu
les\sqlite3\build\node_sqlite3.vcxproj]
It did not work without installing sqlite3 first. So that is what I decided to do.
I did see that tuql has an own dependency on sqlite3 in Version 3.1.13.
So I tried to install sqlite3 v3.1.13 directly and got this:
alexa@DESKTOP-6C4V66Q C:\Users\alexa\test-tuql
$ npm i --save sqlite3@3.1.13
> sqlite3@3.1.13 install C:\Users\alexa\test-tuql\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@10.1.0 (node-v64 ABI) (falling back to source compile with node-gyp)
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
unpack_sqlite_dep
sqlite3.c
win_delay_load_hook.cc
sqlite3.vcxproj -> C:\Users\alexa\test-tuql\node_modules\sqlite3\build\Release\\sqlite3.lib
database.cc
node_sqlite3.cc
statement.cc
win_delay_load_hook.cc
c:\users\alexa\test-tuql\node_modules\nan\nan_maybe_43_inl.h(112): error C2039: 'ForceSet': is not a member of 'v8::Object' (compiling source file ..\src\statement.cc) [C:\Users\alexa\test-tuql\node_modules\sqlite3\build\node_sqlite3.vcxpr oj]
So it seems that for some reason building sqlite3 on Windows errors out. But this only happens because tuql tries to install a version of sqlite3 for which there exists no prepared binary.
If this interpretation is correct, it would be of great help to Windows users if you could update the sqlite3-dependency to a recent version.
Actually, yarn has a feature to deal with such problems: resolutions (https://yarnpkg.com/lang/en/docs/selective-version-resolutions/).
Using them I can successfully install tuql on my windows machine. I have to use this package.json file:
{
"name": "test-tuql",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"sqlite3": "^4.0.1",
"tuql": "^1.5.0"
},
"resolutions": {
"sqlite3": "4.0.1"
}
}
I still feel this issue makes it hard for windows users to use tuql though.
Plus I now have a different issue which may actually be caused by the fact that sqlite used is a too recent version.
Please let me know if you still have this issue with 1.7.0