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

Binary relocation not working for bindings and node-pre-gyp #75

Open
rochdev opened this issue Dec 4, 2019 · 0 comments
Open

Binary relocation not working for bindings and node-pre-gyp #75

rochdev opened this issue Dec 4, 2019 · 0 comments

Comments

@rochdev
Copy link

rochdev commented Dec 4, 2019

I tried using both binding and node-pre-gyp include patterns and both are not working even though the documentation states that they should be supported.

The setup I'm trying to get working is main project "foo" with a dependency on "bar" where the native binaries are in "bar".

What I tried:

  • Using bindings in "bar" with the file located at lib/binding/node-v72-darwin-x64/bindings.node.
  • Using bindings in "bar" with the file located at build/Release/bindings.node.
  • Using node-pre-gyp pattern in "bar" with the file located at lib/binding/node-v72-darwin-x64/bindings.node and calling require(`../../../lib/binding/node-v${process.versions.modules}-${process.platform}-${process.arch}/bindings.node`).

Interestingly, for the last case if I call instead require(`../../../lib/binding/node-v72-${os.platform()}-${os.arch()}/bindings.node`) it works properly. It looks like os is supported for dynamic paths but not process? I wonder if the same issue applies to bindings which would explain why it also doesn't work.

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

1 participant