-
-
Notifications
You must be signed in to change notification settings - Fork 570
@electron-forge/plugin-auto-unpack-natives does not unpack natives #3934
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
Comments
Your issue saved me from hours of debugging. It's still not solved on 7.8.1 regarless thank you. |
I currently have it working on [email protected] with
but you need to add some code in your forge config to package external deps, see #3738 (comment) |
Im getting a lot of pain head with prisma, mikroORM all of it's getting me some problem on electron forge. I cant debug render in vscode etc. I think im gonna switch to electron-vite only. I feel it's coded thinking I'll just do a web site and embed it on electron without any native stuff as usb sqlite etc |
Try use WEBPACK instead of vite. |
Does electron-vite fixes the issue? I think it uses forge for distribution. Let me know if it works. I am facing the same issue. |
I fixed the most of problems regarding native libs but still not able to run prisma/mikro it was getting too hard ... for me it means prisma/mikro was not made to electron even I get a way to make it working at a first time. I switched to drizzle and not painhead |
Uh oh!
There was an error while loading. Please reload this page.
Pre-flight checklist
Forge version
7.8.0
Electron version
v36.2.0
Operating system
Windows 10 (19045)
Last known working Forge version
7.3.1
Expected behavior
When creating a new project and installing a native dependency, the native node binding should be available in the
resources/app.asar.unpacked
directory.Actual behavior
The app.asar.unpack folder does not exist, the native bindings are not in the app.asar either.
Steps to reproduce
Create a new project using the Vite + Typescript template:
npx create-electron-app@latest vite_electron_natives --template=vite-typescript cd vite_electron_natives
Ensure that AutoUnpackNatives plugins is included in the
forge.config.ts
:Install any native plugin and package:
Additional information
I have spent hours trying to get this to work. The only way I have been able to make it work is by using the following packagerConfig in
forge.config.ts
(along with the AutoUnpackNatives plugin):I also tried adding the vite-plugin-native plugin, which had no effect.
I have an electron-forge + Vite project using Electron Forge version 7.3.1 which works perfectly fine with the following configuration:
It no longer works after upgrading to any version above 7.3.1. Just bumping the version to 7.4.0 causes the native modules to stop being unpacked.
Please let me know if you have any suggestions as I would love to upgrade to the latest version of Electron Forge.
The text was updated successfully, but these errors were encountered: