Skip to content

Commit

Permalink
Bump better-sqlite3 to 7.5 to fix "Could not detect abi" issue on Win…
Browse files Browse the repository at this point in the history
…dows
  • Loading branch information
bengotow committed Feb 28, 2022
1 parent 5ff67fd commit 4b2f682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@bengotow/slate-edit-list": "github:bengotow/slate-edit-list#b868e108",
"@electron/remote": "^2.0.1",
"better-sqlite3": "^7.1.2",
"better-sqlite3": "^7.5.0",
"cheerio": "^1.0.0-rc.6",
"chromium-net-errors": "1.0.3",
"chrono-node": "^1.1.2",
Expand Down
2 changes: 2 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ async function run() {
rimraf.sync(path.join(appModulesPath, 'better-sqlite3'));
// install the module pointing to our local sqlite source with custom #DEFINEs set
const amalgamationPath = path.join(appPath, 'build', 'sqlite-amalgamation');
await npm('config set msvs_version 2019');
await npm(
`install better-sqlite3@${appDependencies['better-sqlite3']} ` +
`--no-save --no-audit --build-from-source --sqlite3="${amalgamationPath}"`,
{ cwd: './app', env: 'electron' }
);
await npm('config set msvs_version 2015');
// remove the build symlinks so that we can build an installer for the app without
// symlinks out to the sqlite-amalgamation directory.
rimraf.sync(path.join(appModulesPath, 'better-sqlite3', 'build', 'Release', 'obj'));
Expand Down

0 comments on commit 4b2f682

Please sign in to comment.