-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using better-sqlittte3 for electron app #1028
Comments
Does not look like an better-sqlite3 issue but a rollup configuration problem of the ominous app that threw the error. Can you provide more details? |
3q for your answer! I found the error that not import 'sqslite3' but require('sqlite3'), but i don't know why |
at beginning , |
|
(closing: issue is for a different package) |
@mceachen - The original call stack actually is for If you read the first callstack:
As an aside, I ran into the same issue as I also use Rollup in my electron build. That is why I originally posted #972 (because I had to hack #972 into my own copy of better-sqlite which I currently use) which should be fixed and allow me to use the stock better-sqlite in #974 when it is merged. |
App threw an error during load
Error: Could not dynamically require "$pwd/electron-vite/build/better_sqlite3.node". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.
at commonjsRequire (/Users/apple/work-dir/electron-vite/dist-electron/main.js:29:9)
at bindings2 (/Users/apple/work-dir/electron-vite/dist-electron/main.js:166:52)
at new Database$1 (/Users/apple/work-dir/electron-vite/dist-electron/main.js:797:64)
at Object. (/Users/apple/work-dir/electron-vite/dist-electron/main.js:833:12)
at Module._compile (node:internal/modules/cjs/loader:1269:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1324:10)
at Module.load (node:internal/modules/cjs/loader:1124:32)
at Module._load (node:internal/modules/cjs/loader:965:12)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at loadApplicationPackage (/Users/apple/work-dir/electron-vite/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js:121:16)
The text was updated successfully, but these errors were encountered: