fix(monorepo/server): missing dependencies to bettersqlite

This commit is contained in:
Elian Doran 2025-04-24 21:45:13 +03:00
parent ec8740b179
commit e819facf63
No known key found for this signature in database
5 changed files with 23 additions and 11 deletions

View File

@ -42,11 +42,7 @@ module.exports = {
{ {
from: "../server/dist/assets", from: "../server/dist/assets",
to: join(outputDir, "assets") to: join(outputDir, "assets")
}, }
{
from: "node_modules/better-sqlite3",
to: join(outputDir, "node_modules/better-sqlite3")
},
] ]
}) })
] ]

View File

@ -12,6 +12,7 @@
"async-mutex": "0.5.0", "async-mutex": "0.5.0",
"axios": "1.8.4", "axios": "1.8.4",
"better-sqlite3": "11.9.1", "better-sqlite3": "11.9.1",
"bindings": "1.5.0",
"chardet": "2.1.0", "chardet": "2.1.0",
"cheerio": "1.0.0", "cheerio": "1.0.0",
"chokidar": "4.0.3", "chokidar": "4.0.3",
@ -31,6 +32,7 @@
"express-openid-connect": "^2.17.1", "express-openid-connect": "^2.17.1",
"express-rate-limit": "7.5.0", "express-rate-limit": "7.5.0",
"express-session": "1.18.1", "express-session": "1.18.1",
"file-uri-to-path": "2.0.0",
"fs-extra": "11.3.0", "fs-extra": "11.3.0",
"helmet": "8.1.0", "helmet": "8.1.0",
"html": "1.0.0", "html": "1.0.0",

View File

@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"module": "ESNext", "module": "ESNext",
"moduleResolution": "nodenext", "moduleResolution": "bundler",
"target": "ES2020", "target": "ES2020",
"outDir": "dist", "outDir": "dist",
"types": [ "types": [

View File

@ -5,10 +5,7 @@ const { join, default: path } = require('path');
const outputDir = join(__dirname, 'dist'); const outputDir = join(__dirname, 'dist');
function buildFilesToCopy() { function buildFilesToCopy() {
const files = [{ const files = [];
from: "node_modules/better-sqlite3/build/Release",
to: join(outputDir, "Release")
}];
files.push({ files.push({
from: "../client/dist", from: "../client/dist",
@ -29,7 +26,12 @@ function buildFilesToCopy() {
"codemirror/addon", "codemirror/addon",
"codemirror/mode", "codemirror/mode",
"codemirror/keymap", "codemirror/keymap",
"@highlightjs/cdn-assets" "@highlightjs/cdn-assets",
// Required as they are native dependencies and cannot be well bundled.
"better-sqlite3",
"bindings",
"file-uri-to-path"
]; ];
for (const nodePath of nodePaths) { for (const nodePath of nodePaths) {

12
pnpm-lock.yaml generated
View File

@ -345,6 +345,9 @@ importers:
better-sqlite3: better-sqlite3:
specifier: 11.9.1 specifier: 11.9.1
version: 11.9.1 version: 11.9.1
bindings:
specifier: 1.5.0
version: 1.5.0
chardet: chardet:
specifier: 2.1.0 specifier: 2.1.0
version: 2.1.0 version: 2.1.0
@ -402,6 +405,9 @@ importers:
express-session: express-session:
specifier: 1.18.1 specifier: 1.18.1
version: 1.18.1 version: 1.18.1
file-uri-to-path:
specifier: 2.0.0
version: 2.0.0
fs-extra: fs-extra:
specifier: 11.3.0 specifier: 11.3.0
version: 11.3.0 version: 11.3.0
@ -5466,6 +5472,10 @@ packages:
file-uri-to-path@1.0.0: file-uri-to-path@1.0.0:
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
file-uri-to-path@2.0.0:
resolution: {integrity: sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==}
engines: {node: '>= 6'}
filelist@1.0.4: filelist@1.0.4:
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==}
@ -15352,6 +15362,8 @@ snapshots:
file-uri-to-path@1.0.0: {} file-uri-to-path@1.0.0: {}
file-uri-to-path@2.0.0: {}
filelist@1.0.4: filelist@1.0.4:
dependencies: dependencies:
minimatch: 5.1.6 minimatch: 5.1.6