Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs 12 support #1151

Closed
matoro opened this issue Apr 25, 2019 · 10 comments
Closed

nodejs 12 support #1151

matoro opened this issue Apr 25, 2019 · 10 comments

Comments

@matoro
Copy link

matoro commented Apr 25, 2019

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 nodejs/nan#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>)’                                                                                            
             ),                                                                 \                                                                                                                                      
             ^
@getify
Copy link

getify commented Apr 26, 2019

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.

@kewde
Copy link
Collaborator

kewde commented Apr 27, 2019

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.

@getify
Copy link

getify commented Apr 27, 2019

@kewde was is it 4.0.6? because that didn't work with node 11 on either of my systems (osx or debian).

@kewde
Copy link
Collaborator

kewde commented Apr 27, 2019

Support for Node 11 was added in 4.0.4

@kibertoad
Copy link

kibertoad commented Apr 28, 2019

appveyor/ci#2921

@shinnn
Copy link

shinnn commented Apr 28, 2019

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. appveyor/ci#2921 (comment)

piglovesyou added a commit to piglovesyou/react-starter-kit that referenced this issue May 6, 2019
* Sqlite3 is still working on supporting Node12 TryGhost/node-sqlite3#1151
@getify
Copy link

getify commented May 6, 2019

Any chance of this soon?

@kewde
Copy link
Collaborator

kewde commented May 7, 2019

Node 12 has been merged to master, will do release very soon.
see #1138

@kewde
Copy link
Collaborator

kewde commented May 8, 2019

node-sqlite3 v4.0.7 has been released.

@kewde kewde closed this as completed May 8, 2019
langpavel pushed a commit to kriasoft/react-starter-kit that referenced this issue May 27, 2019
* update apollo packages

* bye apollo-link-state

* fix: jest error by updating jest

* mod: Make `yarn codegen` always executable

* mod: Take care non-js import in flowconfig

* suppress 'sequelize deprecated String based operators' error

* suppress 'Please use `require("history").PathUtils' error

* refac: make all components functional

* Flow to Typescript  (#13)

* get available port on codegen (#14)

* improve tyeps (#15)

* refactor typings

* remove unnecessary babel plugin

* Type models

* pass `eslint --ext .ts --ext .tsx`

* mod: clear old type defs before codegen

improve eslint defs

* ignore Node12 build

* Sqlite3 is still working on supporting Node12 TryGhost/node-sqlite3#1151

* Fix Node 12 build failure
VonOx added a commit to VonOx/Gladys that referenced this issue Jan 3, 2020
@smyth64
Copy link

smyth64 commented Apr 26, 2020

node-sqlite3 v4.0.7 has been released.

Works like charm :) thx!!!

snowMan128 added a commit to snowMan128/starterKit that referenced this issue Jul 17, 2024
* update apollo packages

* bye apollo-link-state

* fix: jest error by updating jest

* mod: Make `yarn codegen` always executable

* mod: Take care non-js import in flowconfig

* suppress 'sequelize deprecated String based operators' error

* suppress 'Please use `require("history").PathUtils' error

* refac: make all components functional

* Flow to Typescript  (#13)

* get available port on codegen (#14)

* improve tyeps (#15)

* refactor typings

* remove unnecessary babel plugin

* Type models

* pass `eslint --ext .ts --ext .tsx`

* mod: clear old type defs before codegen

improve eslint defs

* ignore Node12 build

* Sqlite3 is still working on supporting Node12 TryGhost/node-sqlite3#1151

* Fix Node 12 build failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants