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

native modules support? #8

Open
yrik opened this issue Mar 17, 2019 · 3 comments
Open

native modules support? #8

yrik opened this issue Mar 17, 2019 · 3 comments

Comments

@yrik
Copy link

yrik commented Mar 17, 2019

Thanks for the nice project.

I have downloaded the code of the package and tried to include a native module (keytar) as a dependency.

I have added node_modules with freshly built keytar to the app folder.
However when I call require('./node_modules/keytar/build/Release/keytar.node')
it says A dynamic link library initialization failed.
I have locally exactly the same node version as used in the launchui.
When I try to require it directly from the node it works fine.

Is it something related to the way node.h is used?

@mimecorg
Copy link
Owner

I think that the problem is that launchui builds node as a shared library, and standard native modules are linked against a static node executable. It's a similar problem to using native modules with Electron.

If you compile launchui from sources, then you can try to recompile the native module using the version of node from the deps/node subdirectory.

@yrik
Copy link
Author

yrik commented Mar 24, 2019

Thank you for the answer! It gave me some hints already.

I've looked deeper and here is the progress so far https://stackoverflow.com/questions/55328514/how-to-build-native-nodejs-modules-for-launchui

Currently struggling with how to rebuild native modules in a way that they are dependent on node.dll and not node.exe.

Could you advise something?

@yrik
Copy link
Author

yrik commented Mar 31, 2019

If you compile launchui from sources, then you can try to recompile the native module using the version of node from the deps/node subdirectory.

Thanks, it's actually helped.

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