Webpack + Electron Forge + SQlite3 should work out of the box
See original GitHub issuePreflight Checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Issue Details
- Electron Forge Version:
- 6.0.0-beta.49
- Electron Version:
- v7.1.7
- Operating System:
- Windows 10 x64
Expected Behavior
Webpack should copy and use the Electron bindings from
node_modules\sqlite3\lib\binding\electron-v7.1-win32-x64\node_sqlite3.node
Actual Behavior
Webpack instead copies the original Node bindings and loads those, giving the usual Error: The module was compiled against a different Node.js version
, with the following path:
node_modules\sqlite3\lib\binding\node-v79-win32-x64\node_sqlite3.node
To Reproduce
Configure Forge with webpack (I also use TypeScript), install sqlite3, import it in a script, and run the start script.
Additional Information
None
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Webpack + Electron Forge + SQlite3 should work out of the box
Configure Forge with webpack (I also use TypeScript), install sqlite3, import it in a script, and run the start script. Additional Information.
Read more >Integrating Sqlite3 in electron project built with Electron-forge
With this, I was able to run the app and create a database. But when I tried packaging the app, better-sqlite3 was missing...
Read more >Setting up sqlcipher in an electron app using electron-forge ...
I started a fresh minimal install of electron-forge with Webpack and Typescript template ( npx create-electron-app test-electron-forge-github - ...
Read more >Installing and rebuilding Sqlite3 for use with Electron - YouTube
Having trouble with a native dependency? Getting a "module not found" on native modules even thought you've just installed them?- Electron ...
Read more >Need help getting SQLite working with Electron on Windows 10
I have been trying for weeks to get SQLite installed and working with ... I do check the box that says "Automatically install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cyril-barragan In case you ever give
electron-forge
a shot again, then check this outI found a working solution with
electron-forge
&better-sqlite3
& correct bindings are used 😃Yes I did but no luck either, I even set it as postinstall script. I ended up not using electron-forge and using only electron-webpack with electron-rebuild as postinstall script.