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