From 767bf5c140713d846b2fddba68703f0a2a4737ff Mon Sep 17 00:00:00 2001 From: mirivlad Date: Mon, 15 Jun 2026 09:25:28 +0800 Subject: [PATCH] fix: auto-install frontend deps in build script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add npm install check to build_gui() — if node_modules/ is missing or doesn't match package-lock.json, install dependencies before building. --- scripts/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index d6024e6..30d6812 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,8 +13,14 @@ BUILD_DIR="build" build_gui() { echo "==> Building GUI binary..." - # Build frontend - cd frontend && npm run build && cd .. + # Ensure frontend dependencies are installed + cd frontend + if [ ! -d "node_modules" ] || [ ! -f "node_modules/.package-lock.json" ]; then + echo "==> Installing frontend dependencies..." + npm install + fi + npm run build + cd .. # Copy frontend dist to Wails embed directory rm -rf cmd/verstak-gui/frontend-dist