Closed Default-01 closed 11 months ago
Please give more information about "your project". Which NodeJS / Electron version are you targetting, which OS are you building on? Do you use npm, yarn or pnpm for package management? Are any bundlers (webpack, rollup ..) involved?
In order to use native modules, the native binaries must be shipped alongside the binary generated by nexe.
https://github.com/nexe/nexe#native-modules
This is not an issue with better-sqlite3 but an issue with nexe and how you need to properly configure it.
Please give more information about "your project". Which NodeJS / Electron version are you targetting, which OS are you building on? Do you use npm, yarn or pnpm for package management? Are any bundlers (webpack, rollup ..) involved?
In order to use native modules, the native binaries must be shipped alongside the binary generated by nexe.
https://github.com/nexe/nexe#native-modules
This is not an issue with better-sqlite3 but an issue with nexe and how you need to properly configure it.
I include all node_modules when compiling with nexe, I don't know if I need to include more. i cant include the db.sqlite3
file itself cause the user must be able to delete the file to do a full reset.
It's unclear to me what "alongside" means by the nexe documentation. Did you try moving the better_sqlite3.node
into one of the directories that bindings
is looking for?
Also: node 16 is EOL and is not supported by this package. Node 16 seems to be the latest Node that Nexe supports, but the CHANGELOG and latest release hasn't been updated for years.
In any event, this is a nexe issue, not a better-sqlite3 issue.
The code runs without issues when i build my app, but when I compile it and run the executable I get the following error:
This is my code:
I use nexe.js to compile my project.