Skip to content

Commit 4b2f682

Browse files
committed
Bump better-sqlite3 to 7.5 to fix "Could not detect abi" issue on Windows
1 parent 5ff67fd commit 4b2f682

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@bengotow/slate-edit-list": "github:bengotow/slate-edit-list#b868e108",
1515
"@electron/remote": "^2.0.1",
16-
"better-sqlite3": "^7.1.2",
16+
"better-sqlite3": "^7.5.0",
1717
"cheerio": "^1.0.0-rc.6",
1818
"chromium-net-errors": "1.0.3",
1919
"chrono-node": "^1.1.2",

scripts/postinstall.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,13 @@ async function run() {
145145
rimraf.sync(path.join(appModulesPath, 'better-sqlite3'));
146146
// install the module pointing to our local sqlite source with custom #DEFINEs set
147147
const amalgamationPath = path.join(appPath, 'build', 'sqlite-amalgamation');
148+
await npm('config set msvs_version 2019');
148149
await npm(
149150
`install better-sqlite3@${appDependencies['better-sqlite3']} ` +
150151
`--no-save --no-audit --build-from-source --sqlite3="${amalgamationPath}"`,
151152
{ cwd: './app', env: 'electron' }
152153
);
154+
await npm('config set msvs_version 2015');
153155
// remove the build symlinks so that we can build an installer for the app without
154156
// symlinks out to the sqlite-amalgamation directory.
155157
rimraf.sync(path.join(appModulesPath, 'better-sqlite3', 'build', 'Release', 'obj'));

0 commit comments

Comments
 (0)