diff --git a/app/package.json b/app/package.json index 5b8cf8b8..45e2ee8f 100644 --- a/app/package.json +++ b/app/package.json @@ -5,7 +5,7 @@ "author": "Jan Prochazka ", "description": "Opensource database administration tool", "dependencies": { - "better-sqlite3": "^7.4.5", + "better-sqlite3-with-prebuilds": "^7.4.3", "electron-log": "^4.4.1", "electron-store": "^8.0.1", "electron-updater": "^4.6.1", diff --git a/fillNativeModules.js b/fillNativeModules.js index 61dea66e..d5115725 100644 --- a/fillNativeModules.js +++ b/fillNativeModules.js @@ -5,7 +5,7 @@ let fillContent = ''; if (process.platform == 'win32') { fillContent += `content.msnodesqlv8 = () => require('msnodesqlv8');`; } -fillContent += `content['better-sqlite3'] = () => require('better-sqlite3');`; +fillContent += `content['better-sqlite3-with-prebuilds'] = () => require('better-sqlite3-with-prebuilds');`; const getContent = (empty) => ` // this file is generated automatically by script fillNativeModules.js, do not edit it manually diff --git a/packages/api/package.json b/packages/api/package.json index 3ad5d93b..b1ac4c36 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -19,7 +19,7 @@ "dependencies": { "async-lock": "^1.2.4", "axios": "^0.21.1", - "better-sqlite3": "^7.4.5", + "better-sqlite3-with-prebuilds": "^7.4.3", "body-parser": "^1.19.0", "bufferutil": "^4.0.1", "byline": "^5.0.0", diff --git a/plugins/dbgate-plugin-sqlite/src/backend/driver.js b/plugins/dbgate-plugin-sqlite/src/backend/driver.js index caef4471..e6a8cf21 100644 --- a/plugins/dbgate-plugin-sqlite/src/backend/driver.js +++ b/plugins/dbgate-plugin-sqlite/src/backend/driver.js @@ -175,8 +175,8 @@ const driver = { }; driver.initialize = (dbgateEnv) => { - if (dbgateEnv.nativeModules && dbgateEnv.nativeModules['better-sqlite3']) { - Database = dbgateEnv.nativeModules['better-sqlite3'](); + if (dbgateEnv.nativeModules && dbgateEnv.nativeModules['better-sqlite3-with-prebuilds']) { + Database = dbgateEnv.nativeModules['better-sqlite3-with-prebuilds'](); } };