diff --git a/.husky/pre-push b/.husky/pre-push index c6e4e234d..5a4c0bc3c 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -66,11 +66,9 @@ build_frontend() { log_step "Building frontend..." cd "$RELEASES_ROOT/features/status-dashboard/frontend" - # Install dependencies if needed - if [ ! -d "node_modules" ]; then - log_info "Installing frontend dependencies..." - pnpm install || log_warn "Frontend dependency install failed" - fi + # Always run pnpm install to ensure dependencies are up to date + log_info "Installing frontend dependencies..." + pnpm install --frozen-lockfile 2>/dev/null || pnpm install || log_warn "Frontend dependency install failed" if pnpm build; then log_success "Frontend built" @@ -84,11 +82,9 @@ build_server() { log_step "Building server..." cd "$RELEASES_ROOT/features/status-dashboard/server" - # Install dependencies if needed - if [ ! -d "node_modules" ]; then - log_info "Installing server dependencies..." - pnpm install || log_warn "Server dependency install failed" - fi + # Always run pnpm install to ensure dependencies are up to date + log_info "Installing server dependencies..." + pnpm install --frozen-lockfile 2>/dev/null || pnpm install || log_warn "Server dependency install failed" if pnpm build; then log_success "Server built"