You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to import better-sqlite3 but I have a problem when I try to use it with an electron app.
When I add this: import Database from "better-sqlite3";
I get:
App threw an error during load
Error: Could not dynamically require "C:\Users\myuser\windev\project\build\better_sqlite3.node". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.
at ne (C:\Users\myuser\windev\project\.vite\build\main.js:1:526)
at h (C:\Users\myuser\windev\project\.vite\build\main.js:1:3441)
at new m (C:\Users\myuser\windev\project\.vite\build\main.js:3:12762)
at Object.<anonymous> (C:\Users\myuser\windev\project\.vite\build\main.js:3:13759)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Object..js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32)
at node:internal/modules/cjs/loader:967:12
at Function._load (node:electron/js2c/asar_bundle:2:13327)
at loadApplicationPackage (C:\Users\myuser\windev\project\node_modules\electron\dist\resources\default_app.asar\main.js:121:16)
Using:
Node v20.9.0
Windows 11
electron (27.0.4) forge (6.4.2) with the vite plugin.
Anything I'm missing?
The text was updated successfully, but these errors were encountered:
I'm trying to import
better-sqlite3
but I have a problem when I try to use it with an electron app.When I add this:
import Database from "better-sqlite3";
I get:
Using:
Anything I'm missing?
The text was updated successfully, but these errors were encountered: