Closed jove0610 closed 2 years ago
Best to exclude the iohook binaries (and any other native module binaries you might be using) from the asar. Adding this option to packagerConfig
covers most cases:
packagerConfig: {
asar: {
unpack: "**/*.+(node|dll|exe)",
smartUnpack: true
}
}
Thanks @marcelblum
The error appears when I packaged the app as asar. There is no error during the packaging and it will package successfully, only when I open the application I got the error. The error will not appear and the app will open normally if I did not package it as asar.
Expected Behavior
App will work when I packaged an app as asar.
Current Behavior
Here is the error:
I can only get the image of the error. I can't copy-paste the text.
Possible Solution
Steps to Reproduce (for bugs)
npx create-electron-app@latest my-app
Context
I am trying to package my app in asar file, I read in electron docs that it optimizes the app. Also, it'll look more professional if the app is in asar.
Your Environment
Thanks