From d59546440001403f4d1207b724629c3ba478d4ea Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 16 Jun 2026 00:52:22 +0000 Subject: [PATCH] fix: preserve node_modules during upgrade to avoid re-downloading Electron The upgrade was wiping node_modules then relying on npm to re-download the ~120MB Electron binary. npm returns exit 0 even when the download times out, leaving the kiosk with no Electron binary and a blank screen on next boot. node_modules only needs to be deleted on a fresh install or when explicitly changing Electron version. For a JS-file-only upgrade, npm install without a wipe is either a no-op (no changes) or applies dependency updates cleanly. The install_electron_binary fallback remains as a safety net. https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU --- ubuntu-based-kiosk-v1.0.2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu-based-kiosk-v1.0.2.sh b/ubuntu-based-kiosk-v1.0.2.sh index a5a740e..a9dfeb5 100644 --- a/ubuntu-based-kiosk-v1.0.2.sh +++ b/ubuntu-based-kiosk-v1.0.2.sh @@ -11093,8 +11093,8 @@ upgrade_kiosk() { sudo rm -f "$KIOSK_DIR/pause-dialog.html" sudo rm -f "$KIOSK_DIR/pin-entry.html" sudo rm -f "$KIOSK_DIR/inactivity-prompt-extended.html" - sudo rm -rf "$KIOSK_DIR/node_modules" - sudo rm -f "$KIOSK_DIR/package-lock.json" + # node_modules is NOT removed — preserves the Electron binary (~120MB download) + # npm install below is a no-op if dependencies haven't changed log_success "Old files removed" echo "[4/6] Extracting new app files from script..."