I am using electron 11.1.0 and electron-builder 22.10.5
I created a installer for my electron app which is using native module
using electron-builder and its working fine on my laptop but on my friends laptop I am getting error
A JavaScript error occurred in the main process
Uncaught Exception:
Error: The specified module could not be found.
\\?C:\some\path\My-Electron-App\resources\app.asar.unpacked\node_modules\obs-studio-node\obs_studio_client.node
I have checked C:\some\path\My-Electron-App\resources\app.asar.unpacked\node_modules\obs-studio-node\obs_studio_client.node
file exists.
I guess its asar
related issue with native module
. I tried by adding "asarUnpack": ["**/*.node"]
in my build
config but does not help.
How can I fix this problem?
I could not get this working with asarUnpack. Instead I use
Increases the bundle size, but at least it works.