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

nw-gyp rebuild nodegit error targeting 0.34.x #6869

Closed
hhhoney opened this issue Nov 14, 2018 · 7 comments
Closed

nw-gyp rebuild nodegit error targeting 0.34.x #6869

hhhoney opened this issue Nov 14, 2018 · 7 comments

Comments

@hhhoney
Copy link

hhhoney commented Nov 14, 2018

Rebuild nodegit error

(macOS Mojave 10.14.1, node 11.1.0, nwjs 0.34.3, npm 6.4.1, nw-gyp 3.6.3, node-gyp 3.8.0)

--target=0.24.2 is OK
--target=0.34.x Failed

Reproduce:

npm install nodegit

cd node_modules/nodegit

nw-gyp rebuild --target=0.34.3

Error message:

../src/filter_registry.cc:58:21: error: no matching constructor for initialization of 'String::Utf8Value'
  String::Utf8Value name(info[0]->ToString());
                    ^    ~~~~~~~~~~~~~~~~~~~
../src/filter_registry.cc:147:21: error: no matching constructor for initialization of 'String::Utf8Value'
  String::Utf8Value name(info[0]->ToString());
                    ^    ~~~~~~~~~~~~~~~~~~~
@rogerwang
Copy link
Member

Does this module work well with Node.js v11.1.0?

@hhhoney
Copy link
Author

hhhoney commented Nov 14, 2018

Yes it does.

@rogerwang
Copy link
Member

I think you need to run nw-gyp configure first, or use this simpler way: http://docs.nwjs.io/en/latest/For%20Users/Advanced/Use%20Native%20Node%20Modules/#for-non-lts-releases

@hhhoney
Copy link
Author

hhhoney commented Nov 14, 2018

I have tried the given instructions and the error still exists 😢

some more error messages:

../src/repository.cc:86:21: error: no matching conversion for functional-style cast from 'v8::Local<v8::Value>' to 'String::Utf8Value'
  std::string path(*String::Utf8Value(args[0]));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~

@rogerwang
Copy link
Member

Turns out we hit this issue: nodejs/node#23122

Will fix it in NW soon.

@rogerwang rogerwang transferred this issue from nwjs/nw-gyp Nov 15, 2018
@rogerwang
Copy link
Member

The reference back to this issue in the upstream one was removed after transferring. So ref it again: nodejs/node#23122

rogerwang added a commit that referenced this issue Nov 15, 2018
some native module 'nodegit' depends on the relative
path to configure correctly

Ref #6869
@rogerwang
Copy link
Member

The fix is now available with build target '0.34.4' and this build: https://dl.nwjs.io/live-build/nw34/11-15-2018/2d9d6a7ad/v0.34.4/

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

2 participants