Skip to content

Commit b97d8e3

Browse files
committed
fix: resources builder
1 parent f152466 commit b97d8e3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build/lib/sqlite.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,19 @@ export default class ExternalResource extends ExternalResourceBuilder {
6565
if ( res.status ) return result( 500 );
6666

6767
// build for current nodejs version
68-
res = childProcess.spawnSync( "npx", ["--no-install", "prebuild", "--strip", "--include-regex", "better_sqlite3.node$", "-r", "node"], {
68+
// res = childProcess.spawnSync( "npx", ["--no-install", "prebuild", "--strip", "--include-regex", "better_sqlite3.node$", "-r", "node"], {
69+
// "cwd": this.#cwd,
70+
// "shell": true,
71+
// "stdio": "inherit",
72+
// } );
73+
res = childProcess.spawnSync( "npm", ["run", "build-release"], {
6974
"cwd": this.#cwd,
7075
"shell": true,
7176
"stdio": "inherit",
7277
} );
7378
if ( res.status ) return result( 500 );
7479

75-
const files = glob( "lib/binding/*/*.node", { "cwd": this.#cwd } );
80+
const files = glob( "build/Release/better_sqlite3.node", { "cwd": this.#cwd } );
7681

7782
if ( !files.length ) return result( 500 );
7883

build/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"dependencies": {
1212
"@softvisio/core": "latest",
1313
"adm-zip": "^0.5.9",
14-
"better-sqlite3": "latest",
15-
"node-gyp": "^9.4.0"
14+
"better-sqlite3": "latest"
1615
}
1716
}

0 commit comments

Comments
 (0)