electron-builder does not bundle the dependencies correctly in the build
nikitavoloboev opened this issue · 3 comments
- Electron-Builder Version: 24.4.0
- Node Version: 18.15.0
Trying to do build of app here:
https://github.com/learn-anything/electron-version
If git clone and cd app
and pnpm run compile
which runs:
electron-builder build --config .electron-builder.config.js --dir --config.asar=false
.electron-builder.config.js is config file.
![image](https://user-images.githubusercontent.com/6391776/257019704-905ac7d1-2fe5-464d-8c4e-e9f3f85b4f29.png)
It compiles
But when I try open the app from dist I see this:
![image](https://user-images.githubusercontent.com/6391776/257019712-10dca694-c61e-4060-9a05-ab2a5ccc1e67.png)
I am not sure why but it seems that electron-builder is not bundling the node dependencies correctly for the build?
Thank you lots for any help.
From my investigations I found this issue:
Which had this comment
![image](https://user-images.githubusercontent.com/6391776/257032693-d102816e-bc58-4e9f-89ab-125fbb9d225b.png)
trying to add https://github.com/electron/rebuild now
hopefully that fixes it
It's unclear how to actually integrate rebuild package into the process.
I understand I have to somehow modify the dependency call to node-sqlite3 with rebuild but how is super unclear even after reading rebuild docs.