odbc Package Version: 1.4.6
Node.js Version: 12.18.3
Node.js OS: 4.15.0-88-generic #88-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
node-gyp : v7.1.0
Describe the bug
After cloning the latest code from github I tried compiling the library using node-gyp build command and the build failed with
error: ‘v8::Handle’ has not been declared
static void Init(v8::Handlev8::Object exports);
I did some research and found out that v8 has removed the Handle and we need to use Local . Also some of the syntax have been changed for eg:
../src/odbc.h:226:44: error: no matching function for call to ‘v8::Value::ToBoolean()’
Local VAR = (info[I]->ToBoolean());
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2664:59: note: candidate expects 1 argument, 0 provided
V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean(
Expected behavior
node-gyp build must end with ok for nodev12.18.3
To Reproduce
Steps to reproduce the behavior:
git clone git://github.com/wankdanker/node-odbc.git
cd node-odbc
node-gyp configure
node-gyp build
Code
If applicable, add snippets of code to show:
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate expects 2 arguments, 1 provided
../src/odbc_connection.cpp:1368:42: error: no matching function for call to ‘v8::String::Write(uint16_t)’
table->Write((uint16_t ) data->table);
^
In file included from ../src/odbc_connection.cpp:19:0:
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2872:7: note: candidate: int v8::String::Write(v8::Isolate, uint16_t, int, int, int) const
int Write(Isolate isolate, uint16_t buffer, int start = 0, int length = -1,
^~~~~
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2872:7: note: candidate expects 5 arguments, 1 provided
../src/odbc_connection.cpp:1375:56: error: no matching function for call to ‘v8::String::Equals(v8::Localv8::String)’
if (!column->Equals(Nan::New("null").ToLocalChecked())) {
^
In file included from ../src/odbc_connection.cpp:19:0:
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate: v8::Maybe v8::Value::Equals(v8::Localv8::Context, v8::Localv8::Value) const
V8_WARN_UNUSED_RESULT Maybe Equals(Local context,
^~
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate expects 2 arguments, 1 provided
../src/odbc_connection.cpp:1378:44: error: no matching function for call to ‘v8::String::Write(uint16_t)’
column->Write((uint16_t ) data->column);
odbc Package Version: 1.4.6 Node.js Version: 12.18.3 Node.js OS: 4.15.0-88-generic #88-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux node-gyp : v7.1.0 Describe the bug After cloning the latest code from github I tried compiling the library using node-gyp build command and the build failed with error: ‘v8::Handle’ has not been declared static void Init(v8::Handlev8::Object exports); I did some research and found out that v8 has removed the Handle and we need to use Local . Also some of the syntax have been changed for eg: ../src/odbc.h:226:44: error: no matching function for call to ‘v8::Value::ToBoolean()’ Local VAR = (info[I]->ToBoolean()); /root/.cache/node-gyp/12.18.3/include/node/v8.h:2664:59: note: candidate expects 1 argument, 0 provided V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean( Expected behavior node-gyp build must end with ok for nodev12.18.3
To Reproduce Steps to reproduce the behavior:
git clone git://github.com/wankdanker/node-odbc.git cd node-odbc node-gyp configure node-gyp build Code If applicable, add snippets of code to show:
/root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate expects 2 arguments, 1 provided ../src/odbc_connection.cpp:1368:42: error: no matching function for call to ‘v8::String::Write(uint16_t)’ table->Write((uint16_t ) data->table); ^ In file included from ../src/odbc_connection.cpp:19:0: /root/.cache/node-gyp/12.18.3/include/node/v8.h:2872:7: note: candidate: int v8::String::Write(v8::Isolate, uint16_t, int, int, int) const int Write(Isolate isolate, uint16_t buffer, int start = 0, int length = -1, ^~~~~ /root/.cache/node-gyp/12.18.3/include/node/v8.h:2872:7: note: candidate expects 5 arguments, 1 provided ../src/odbc_connection.cpp:1375:56: error: no matching function for call to ‘v8::String::Equals(v8::Localv8::String)’ if (!column->Equals(Nan::New("null").ToLocalChecked())) { ^ In file included from ../src/odbc_connection.cpp:19:0: /root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate: v8::Maybe v8::Value::Equals(v8::Localv8::Context, v8::Localv8::Value) const V8_WARN_UNUSED_RESULT Maybe Equals(Local context, ^
~/root/.cache/node-gyp/12.18.3/include/node/v8.h:2712:37: note: candidate expects 2 arguments, 1 provided ../src/odbc_connection.cpp:1378:44: error: no matching function for call to ‘v8::String::Write(uint16_t)’ column->Write((uint16_t ) data->column);