PunchedYou
PunchedYou
KKysely
Created by PunchedYou on 1/29/2024 in #help
SQLite__namespace is not a constructor
No description
8 replies
KKysely
Created by PunchedYou on 1/29/2024 in #help
SQLite__namespace is not a constructor
Omg thanks I somehow tried everything except that like importing Database, ...
8 replies
KKysely
Created by PunchedYou on 1/29/2024 in #help
SQLite__namespace is not a constructor
Error gets thrown in line 26: database: new SQLite__namespace("../../../resources/database.sqlite3")
8 replies
KKysely
Created by PunchedYou on 1/29/2024 in #help
SQLite__namespace is not a constructor
out/main.js (only the important path of it):
"use strict";
const utils = require("@electron-toolkit/utils");
const electron = require("electron");
const path = require("path");
const SQLite = require("better-sqlite3");
const kysely = require("kysely");
function _interopNamespaceDefault(e) {
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
if (e) {
for (const k in e) {
if (k !== "default") {
const d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: () => e[k]
});
}
}
}
n.default = e;
return Object.freeze(n);
}
const SQLite__namespace = /* @__PURE__ */ _interopNamespaceDefault(SQLite);
const icon = path.join(__dirname, "../../resources/icon.png");
const dialect = new kysely.SqliteDialect({
database: new SQLite__namespace("../../../resources/database.sqlite3")
});
const db = new kysely.Kysely({
dialect
});
[...]
"use strict";
const utils = require("@electron-toolkit/utils");
const electron = require("electron");
const path = require("path");
const SQLite = require("better-sqlite3");
const kysely = require("kysely");
function _interopNamespaceDefault(e) {
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
if (e) {
for (const k in e) {
if (k !== "default") {
const d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: () => e[k]
});
}
}
}
n.default = e;
return Object.freeze(n);
}
const SQLite__namespace = /* @__PURE__ */ _interopNamespaceDefault(SQLite);
const icon = path.join(__dirname, "../../resources/icon.png");
const dialect = new kysely.SqliteDialect({
database: new SQLite__namespace("../../../resources/database.sqlite3")
});
const db = new kysely.Kysely({
dialect
});
[...]
8 replies