From 0f93d16874740953cefc31256d96d50a1c6d90e7 Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Thu, 6 Aug 2026 18:19:20 -0400 Subject: [PATCH] Add build-tool install step to update script Ensures gcc/g++/python3 are present before npm install so better-sqlite3 can compile its native binding on a fresh Ubuntu server. Co-Authored-By: Claude Sonnet 4.6 --- update-server.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/update-server.sh b/update-server.sh index faaa142..4b0764a 100644 --- a/update-server.sh +++ b/update-server.sh @@ -11,6 +11,15 @@ cd /opt/resource-monitor echo "📥 Pulling latest code..." git pull origin main +echo "🔧 Ensuring build tools are present (needed for native modules)..." +if command -v apt-get &>/dev/null; then + apt-get install -y --no-install-recommends make gcc g++ python3 2>&1 | tail -5 +elif command -v dnf &>/dev/null; then + dnf install -y make gcc gcc-c++ python3 2>&1 | tail -5 +elif command -v yum &>/dev/null; then + yum install -y make gcc gcc-c++ python3 2>&1 | tail -5 +fi + echo "📦 Installing dependencies..." rm -rf node_modules