Nodejs 12 was released on Tuesday, and sqlite3 fails to build for it. Here are the notable errors:
In file included from ../../nan/nan_new.h:189,
from ../../nan/nan.h:203,
from ../src/database.h:10,
from ../src/database.cc:4:
../../nan/nan_implementation_12_inl.h:337:58: error: expected primary-expression before ‘>’ token
return v8::StringObject::New(value).As<v8::StringObject>();
^
../../nan/nan_implementation_12_inl.h:337:60: error: expected primary-expression before ‘)’ token
return v8::StringObject::New(value).As<v8::StringObject>();
^
In file included from ../src/database.h:10,
from ../src/database.cc:4:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../../nan/nan.h:1034:53: error: no matching function for call to ‘v8::Value::ToString()’
v8::Local<v8::String> string = from->ToString();
^
In file included from ../src/database.h:10,
from ../src/database.cc:4:
../../nan/nan.h:1044:74: error: no matching function for call to ‘v8::String::WriteUtf8(char*&, int, int, const int&)’
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
^
The above three seem to be nan's fault, their ticket tracking node 12 support is https://github.com/nodejs/nan/issues/849 . The below however seem to be sqlite3's fault:
../src/database.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE node_sqlite3::Database::Configure(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/database.cc:351:9: error: no matching function for call to ‘v8::String::Concat(v8::Local<v8::String>, v8::Local<v8::String>)’
)));
^
../src/database.cc:351:11: error: return-statement with a value, in function returning ‘Nan::NAN_METHOD_RETURN_TYPE’ {aka ‘void’} [-fpermissive]
)));
^
In file included from ../src/database.cc:3:
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_AfterExec(uv_work_t*)’:
../src/macros.h:91:13: error: no matching function for call to ‘v8::String::Concat(v8::Local<v8::String>, v8::Local<v8::String>)’
), \
^
I just cloned the repo (as it is at this moment) and was able to run make in it and build it against node 12.0.0, both in Debian-Stretch as well as OSX 10.14. It would be much easier if the current state of the repo was made as a release, so that people don't have to do these manual work-arounds to keep sqlite running when they upgrade Node.
I should note that IME the same install problem was true for the entire life-cycle of Node 11, so it's a real shame this wasn't resolved before Node 12's release.
I'm waiting for Node 12 to be available on the CI system (AppVeyor, Windows builds).
The CI builds and publishes the releases and I can not circumvent that.
@getify there is a release available for Node 11.
@kewde was is it 4.0.6? because that didn't work with node 11 on either of my systems (osx or debian).
Support for Node 11 was added in 4.0.4
I'm waiting for Node 12 to be available on the CI system (AppVeyor, Windows builds).
There is a workaround to install Node.js v12 on AppVeyor. https://github.com/appveyor/ci/issues/2921#issuecomment-486727727
Any chance of this soon?
Node 12 has been merged to master, will do release very soon.
see #1138
node-sqlite3 v4.0.7 has been released.
node-sqlite3 v4.0.7 has been released.
Works like charm :) thx!!!
Most helpful comment
node-sqlite3 v4.0.7 has been released.