From 59e5b2ad771150a7699bc25fda97ad5f130153ea Mon Sep 17 00:00:00 2001 From: Eddy Date: Mon, 13 Apr 2026 20:57:31 +0200 Subject: [PATCH] Fix: Bridge-Prozess im Projektverzeichnis starten (node_modules) current_dir() auf Projektroot setzen damit Node.js die node_modules/@anthropic-ai/sdk findet. Co-Authored-By: Claude Opus 4.6 (1M context) --- src-tauri/src/claude.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src-tauri/src/claude.rs b/src-tauri/src/claude.rs index 733b38b..cd7ad08 100644 --- a/src-tauri/src/claude.rs +++ b/src-tauri/src/claude.rs @@ -93,8 +93,16 @@ pub fn start_bridge(app: &AppHandle) -> Result<(), String> { println!("🔌 Starte Claude Bridge: {:?}", script_path); + // Arbeitsverzeichnis = Projektroot (wo node_modules liegt) + let project_dir = script_path.parent() + .and_then(|p| p.parent()) + .unwrap_or_else(|| std::path::Path::new(".")); + + println!("📂 Bridge Arbeitsverzeichnis: {:?}", project_dir); + let mut child = Command::new("node") .arg(&script_path) + .current_dir(project_dir) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(Stdio::piped())