From 8b600fb6dfa78f79bfe661464f2f70aeb58b44bf Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Sat, 31 May 2025 14:34:56 +0100 Subject: [PATCH] fix: improve service error detection in installer script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace overly broad npm notice detection with specific checks - Add detection for actual npm start misconfiguration in ExecStart - Separate npm errors/warnings from service configuration issues - Provide clearer troubleshooting guidance for each error type This prevents false positives when npm notices appear in logs during normal operation with direct node execution. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/install-pulse.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install-pulse.sh b/scripts/install-pulse.sh index 0ae8070b6..fbfa4cf0a 100755 --- a/scripts/install-pulse.sh +++ b/scripts/install-pulse.sh @@ -1792,10 +1792,14 @@ diagnose_service_failure() { elif echo "$recent_logs" | grep -q "EADDRINUSE.*7655"; then print_error "✗ Port 7655 is already in use" print_error " → Another service is using the default port" - elif echo "$recent_logs" | grep -q "npm notice.*npm install"; then - print_error "✗ Service startup issue with npm execution" - print_error " → The service may be misconfigured to use npm instead of direct node execution" - print_error " → This has been fixed in recent versions - try updating the installer" + elif echo "$recent_logs" | grep -q "ExecStart=.*npm.*start"; then + print_error "✗ Service is misconfigured to use npm start" + print_error " → The service should use direct node execution" + print_error " → Re-run the installer to fix this issue" + elif echo "$recent_logs" | grep -q "npm ERR!" || echo "$recent_logs" | grep -q "npm WARN"; then + print_error "✗ npm-related errors detected" + print_error " → Try running: cd $PULSE_DIR && npm install" + print_error " → Ensure all dependencies are properly installed" else print_error "✗ Unknown service failure" print_error "Recent log entries:"