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

unable to build native module on Node 12 #174

Closed
henderea opened this issue Apr 23, 2019 · 5 comments · Fixed by #181

Comments

@henderea
Copy link

commented Apr 23, 2019

NodeJS 12 seems to be out, but I'm having trouble installing keytar on ubuntu and mac.

There is no prebuilt binary, and I'm having trouble with the regular build, possibly because of some NodeJS C extension api updates?

Logs from installing a package that uses keytar are linked below:
Ubuntu 18.04 LTS (includes console output as a second file): https://gist.github.com/henderea/9869013dabf1711ca9bdd00a000ca148
macOS 10.14.4: https://gist.github.com/henderea/5e238114af39c079cc858c74adf9b676

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

@henderea looks like there's some nan APIs that are no longer supported in Node 12:

https://gist.github.com/henderea/9869013dabf1711ca9bdd00a000ca148#file-console-output-log

../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:356:37: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
   return v8::StringObject::New(value).As<v8::StringObject>();
                                     ^
In file included from /home/henderea/.node-gyp/12.0.0/include/node/node.h:63:0,
                 from ../../nan/nan.h:53,
                 from ../src/async.cc:4:
/home/henderea/.node-gyp/12.0.0/include/node/v8.h:5380:23: note: candidate: static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)
   static Local<Value> New(Isolate* isolate, Local<String> value);
                       ^~~
/home/henderea/.node-gyp/12.0.0/include/node/v8.h:5380:23: note:   candidate expects 2 arguments, 1 provided
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:223,
                 from ../src/async.cc:4:
../../nan/nan_implementation_12_inl.h:356:58: error: expected primary-expression before ‘>’ token
   return v8::StringObject::New(value).As<v8::StringObject>();
                                                          ^
../../nan/nan_implementation_12_inl.h:356:60: error: expected primary-expression before ‘)’ token
   return v8::StringObject::New(value).As<v8::StringObject>();
                                                            ^
In file included from /home/henderea/.node-gyp/12.0.0/include/node/node_object_wrap.h:26:0,
                 from ../../nan/nan.h:55,
                 from ../src/async.cc:4:
../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(persistent().IsNearDeath());
                         ^
../../nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
../../nan/nan_object_wrap.h:127:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(wrap->handle_.IsNearDeath());
                          ^

I've opened #175 to confirm this isn't just you.

@shiftkey shiftkey changed the title Issue with node 12 unable to build native module on Node 12 Apr 23, 2019
@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

@henderea are you able to retest with v4.4.2 that I just published? I think the upgrade to nan might help build from source, but I can't generate a prebuild package for Windows currently because node-abi needs an update.

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

Either v4.4.2 or v4.5.0 should do the trick to be able to build from source. I'm waiting on lgeiger/node-abi#62 to then be able to consume the prebuild package on Node 12.

@henderea

This comment has been minimized.

Copy link
Author

commented Apr 24, 2019

Yep, both systems installed it successfully now. Thanks!

@shiftkey

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

v4.6.0 should now prebuild fine for Node 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.