Electron app in build mode doesn't work with native module, #18113
Unanswered
fprijate
asked this question in
Ideas / Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an Electron app using better-sqlite3. After npm install better-sqlite3 and electron-rebuild , it works fine in dev mode, but it crashes in build mode with:
Error: The module better-sqlite3 was compiled with different node version
I am using [email protected] which uses [email protected] and the same version of node.
After excluding better-sqlite3 from asar in quasar.config.ts:
and going to resources\app.asar.unpacked\node_modules\better-sqlite3 under dist dir
and running electron-rebuild , everything works.
"electron:build": "quasar build -m electron " should run electron-rebuild before packing resources.
Is there some option under electron.packager ?
Beta Was this translation helpful? Give feedback.
All reactions