Skip to content

Build your personal knowledge base with Trilium Notes

fix(monorepo/electron): local dependency issues when running electron-forge result

Elian Doranf73cabc95219
diff --git a/apps/desktop/scripts/copy-dist.ts b/apps/desktop/scripts/copy-dist.ts
index 4c2dd619cf..e6d18f439e 100644
--- a/apps/desktop/scripts/copy-dist.ts
+++ b/apps/desktop/scripts/copy-dist.ts
@@ -43,12 +43,6 @@ try {
fs.copySync(dir, path.join(PUBLIC_DIR, path.basename(dir)));
}
- /*
- * Extract and rebuild the bettersqlite node module.
- */
- fs.moveSync(path.join(DEST_DIR, "node_modules/@triliumnext/server/node_modules/better-sqlite3"), path.join(DEST_DIR, "node_modules/better-sqlite3"));
- execSync("npm run postinstall", { cwd: DEST_DIR });
-
console.log("Copying complete!")
} catch(err) {
diff --git a/apps/server/scripts/copy-dist.ts b/apps/server/scripts/copy-dist.ts
index 1478377d8c..0955d00e61 100644
--- a/apps/server/scripts/copy-dist.ts
+++ b/apps/server/scripts/copy-dist.ts
@@ -46,7 +46,7 @@ function copyNodeModules(packageJsonPath: string) {
// Trigger an npm install to obtain the dependencies.
fs.writeFileSync(path.join(DEST_DIR, "package.json"), JSON.stringify(packageJson));
- execSync(`npm install --omit=dev --omit=optional --omit=peer`, {
+ execSync(`npm install --omit=dev`, {
cwd: DEST_DIR,
stdio: "inherit",
});