-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
node addon is not getting linked in the final packaged app #5932
Comments
Let's not go down the hardcoded path right now since that's a separate issue/error message.
|
@mmaietta I tried asar unpack also, I have been keeping two different projects, with the exact same contents. One I have built using electron-builder, another using electron-forge. I tried unpacking the .node files in both my setups but it is not working. Link |
For the loader: https://github.com/gurisko/awesome-node-loader. This is the magic it's flipping between:
Basically, I couldn't use |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I am having a common issue, though it seems electron related, because I am running the app in dev mode. When I am trying to load a NativeModule.node but the current working directory (cwd) is different than the one where the app is, the module is not loaded even though the path is absolute and correct. This happens when for example the application is run from windows startup. |
I have built an application using electron where I have added native Cpp functionality. The front end part is using react and I am using a webpack script that continuously watches for the changes in the react files
and generate a compiled version of the react files into a compiled_renderer.js. I am then adding directly to the HTML file as a script.
My electron-builder script which I am using and the basic build configuration is
I am adding the node addon to my project using the bindings library
On running the built app on the laptop where I have but the app, I am getting this error.
So I modified the code and added the addon .node file in a separate directory and hardcoded the file path in my js file instead of using bindings.
In this scenario I am able to run the built application on my personal laptop but when I take the entire folder on another computer and run the app or install the app using the setup and then try to run the application. It is giving the error that the .node file is not found, although the path which it is trying to reference is the correct path and it contains the node addon file.
Whereas the file does exist in the given location
Any help would be appreciated. Thanks
The text was updated successfully, but these errors were encountered: