From c9c8b66ea3d76d7ca03c43b8f764bc380a8c2a47 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Wed, 19 Nov 2025 18:29:49 -0300 Subject: [PATCH] chore: install node/openssl in start script when apt-get available --- scripts/start-web.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/start-web.sh b/scripts/start-web.sh index fba7891..59ccb8f 100644 --- a/scripts/start-web.sh +++ b/scripts/start-web.sh @@ -15,15 +15,20 @@ echo "[start-web] Using APP_DIR=$(pwd)" echo "[start-web] NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-}" echo "[start-web] NEXT_PUBLIC_CONVEX_URL=${NEXT_PUBLIC_CONVEX_URL:-}" -# Ensure openssl is available for Prisma runtime checks (best-effort, idempotent) -if ! command -v openssl >/dev/null 2>&1; then - if command -v apt-get >/dev/null 2>&1; then +# Ensure system deps for native modules (best-effort, idempotent) +if command -v apt-get >/dev/null 2>&1; then + if ! command -v openssl >/dev/null 2>&1; then echo "[start-web] openssl not found; installing via apt-get (requires root)" apt-get update -y >/dev/null 2>&1 || true apt-get install -y openssl >/dev/null 2>&1 || true - else - echo "[start-web] openssl not found and apt-get unavailable; continuing" >&2 fi + if ! command -v node >/dev/null 2>&1; then + echo "[start-web] node not found; installing via apt-get (requires root)" + apt-get update -y >/dev/null 2>&1 || true + apt-get install -y nodejs npm >/dev/null 2>&1 || true + fi +else + echo "[start-web] apt-get unavailable; skipping system deps install" >&2 fi # Bun keeps its store in node_modules/.bun by default; ensure it exists and is writable