downgrade sqlite patch version to solve I couldn't build successfully in electron TryGhost/node-sqlite3 #1746

This commit is contained in:
geekgeekrun
2024-03-21 10:06:44 +08:00
parent 1df215abb3
commit 646045fad5
3 changed files with 74 additions and 114 deletions

View File

@@ -5,7 +5,7 @@
"main": "dist/index.js",
"dependencies": {
"reflect-metadata": "^0.2.1",
"sqlite3": "^5.1.7",
"sqlite3": "5.1.6",
"typeorm": "0.3.11",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"

View File

@@ -13,6 +13,8 @@ import { JobInfoChangeLog } from "./entity/JobInfoChangeLog";
import { BossActiveStatusRecord } from "./entity/BossActiveStatusRecord";
import { UserInfo } from "./entity/UserInfo";
import sqlite3 from 'sqlite3';
function initDb(dbFilePath) {
const { DataSource } = requireTypeorm()
const appDataSource = new DataSource({
@@ -21,6 +23,7 @@ function initDb(dbFilePath) {
logging: true,
logger: "simple-console",
database: dbFilePath,
driver: sqlite3, // The important line
entities: [
ChatStartupLog,
BossInfo,