-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
packaged app is unable to locate .node file in electron-forge #1245
Comments
👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
In order to debug your problem further, we need a minimal testcase to reproduce your problem. Using the |
Since the original issue reporter has not responded to the request for additional information in about a week, it's assumed that they either found the answer in another manner or decided not to pursue this issue. If this is incorrect, they can respond with answers to the questions posed, and this issue can be reopened. |
same error, any solutions? |
I believe I'm also running into this and have created a simple test repo here: https://github.com/jparismorgan/electron-forge-napi-pnpm |
The reason for this error may be the .node file cannot find the .dll file in the same directory. |
I have built an application using electron-forge 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.
I am using electron forge to build and package my project. Initally I was trying to package using asar = true, so that I can hide my code files while transferring the packaged folders to other systems, but the app was not running as the native node addons were getting compiled to a temp folder in windows and the packaged app was trying to reference that location. After a lot of searching and trial testing I tried this modification Link in my packager configs
and I am using bindings to import the node addon to my app.
On I have packaged the app using the script
The node is correctly placed in the asar.unpacked folder, and is working correctly in my laptop but when I transferred the entire output folder to another laptop. It is still showing the error.
Whereas the file location for the node file is the same which it is trying to reference as shown in the error message.
But when I built the installer using "electron-forge make" and tried to install it on another laptop. After installation, it was again trying to reference the temp folder for the .node file.
Please can anyone help me with this issue? Thanks
The text was updated successfully, but these errors were encountered: