Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(dx): fix cannot read properties of undefined if DB dir is missing
Elian Doranaa316091e662
diff --git a/apps/server/src/services/resource_dir.ts b/apps/server/src/services/resource_dir.tsindex c274b43ce0..35c056af22 100644--- a/apps/server/src/services/resource_dir.ts+++ b/apps/server/src/services/resource_dir.ts@@ -1,4 +1,3 @@-import log from "./log.js";import path from "path";import fs from "fs";@@ -10,7 +9,7 @@ const ELECTRON_APP_ROOT_DIR = path.resolve(RESOURCE_DIR, "../..");const DB_INIT_DIR = path.resolve(RESOURCE_DIR, "db");if (!fs.existsSync(DB_INIT_DIR)) {- log.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`);+ console.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`);process.exit(1);}