Sannis / node-mysql-libmysqlclient

Asynchronous MySQL binding for Node.js
http://sannis.github.com/node-mysql-libmysqlclient
Other
229 stars 47 forks source link

Does not work with any modern version of Node.js #196

Open ghost opened 7 years ago

ghost commented 7 years ago

Any recommendation for a project compatible with "node-mysql-libmysqlclient" that will work with a current version of Node.js?

abhisekdg commented 7 years ago

Node Version - 6.10.2 ( Previously working fine with v0.10.26) NPM version - 3.10.10 OS - MacOS Sierra 10.12.4

@https://travis-ci.org/Sannis/node-mysql-libmysqlclient/jobs/194103714

var mysqllibclient = require('mysql-libmysqlclient'); ( 1.5.2)

After upgrading the node version to latest, it started throwing error.

MysqlConnectionQueued.prototype = new bindings.MysqlConnection(); TypeError: Cannot read property 'MysqlConnection' of null

Please can anyone suggest how it be supported in latest version of node ??

Compro-Prasad commented 6 years ago

I switched to v6.10.2 but no noticeable change in the build errors. Given I have gcc (GCC) 7.2.1 20171224 might be the problem which throws some nice and overlooked errors. Given I have a long list of errors I am addressing only a few:

../node_modules/nan/nan.h:761:22: error: ‘GetCurrent’ is not a member of ‘v8::Context’
         v8::Context::GetCurrent()->Global()
                      ^~~~~~~~~~
../node_modules/nan/nan.h: In member function ‘void NanAsyncWorker::SavePersistent(const char*, v8::Local<v8::Object>&)’:
../node_modules/nan/nan.h:181:38: error: ‘NewSymbol’ is not a member of ‘v8::String’
 #define NanSymbol(value) v8::String::NewSymbol(value)
                                      ^
../node_modules/nan/nan.h:808:17: note: in expansion of macro ‘NanSymbol’
     handle->Set(NanSymbol(key), obj);
                 ^~~~~~~~~
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Object> NanAsyncWorker::GetFromPersistent(const char*)’:
../node_modules/nan/nan.h:181:38: error: ‘NewSymbol’ is not a member of ‘v8::String’
 #define NanSymbol(value) v8::String::NewSymbol(value)
                                      ^
../node_modules/nan/nan.h:815:24: note: in expansion of macro ‘NanSymbol’
     return handle->Get(NanSymbol(key)).As<v8::Object>();
                        ^~~~~~~~~
../node_modules/nan/nan.h:815:53: error: expected primary-expression before ‘>’ token
     return handle->Get(NanSymbol(key)).As<v8::Object>();
                                                     ^
../node_modules/nan/nan.h:815:55: error: expected primary-expression before ‘)’ token
     return handle->Get(NanSymbol(key)).As<v8::Object>();
                                                       ^
../node_modules/nan/nan.h: In member function ‘virtual void NanAsyncWorker::HandleErrorCallback()’:
../node_modules/nan/nan.h:837:42: error: ‘New’ is not a member of ‘v8::String’
         v8::Exception::Error(v8::String::New(errmsg))
                                          ^~~
../node_modules/nan/nan.h: In function ‘bool _NanGetExternalParts(v8::Handle<v8::Value>, const char**, size_t*)’:
../node_modules/nan/nan.h:1005:12: error: ‘class v8::String’ has no member named ‘IsExternalAscii’; did you mean ‘IsExternal’?
   if (str->IsExternalAscii()) {
            ^~~~~~~~~~~~~~~
            IsExternal
../node_modules/nan/nan.h:1006:23: error: ‘ExternalAsciiStringResource’ in ‘class v8::String’ does not name a type
     const v8::String::ExternalAsciiStringResource* ext;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1007:5: error: ‘ext’ was not declared in this scope
     ext = str->GetExternalAsciiStringResource();
     ^~~
../node_modules/nan/nan.h:1007:5: note: suggested alternative: ‘exit’
     ext = str->GetExternalAsciiStringResource();
     ^~~
     exit
../node_modules/nan/nan.h:1007:16: error: ‘class v8::String’ has no member named ‘GetExternalAsciiStringResource’; did you mean ‘GetExternalStringResource’?
     ext = str->GetExternalAsciiStringResource();
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                GetExternalStringResource
../node_modules/nan/nan.h: In instantiation of ‘void NanDisposePersistent(v8::Persistent<T, v8::NonCopyablePersistentTraits<T> >&) [with T = v8::Object]’:
../node_modules/nan/nan.h:786:44:   required from here
../node_modules/nan/nan.h:394:12: error: ‘class v8::Persistent<v8::Object>’ has no member named ‘Clear’
     handle.Clear();
     ~~~~~~~^~~~~
make: *** [mysql_bindings.target.mk:99: Release/obj.target/mysql_bindings/src/mysql_bindings.o] Error 1
make: Leaving directory '/home/compro/Downloads/github.com/Sannis/node-mysql-libmysqlclient/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

The build is done after checking out to v1.6.0 of mysql-libmysqlclient