From 1f20500b5fc4b9d1bd04178084cde45d67a834ab Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 20 Oct 2025 10:00:30 +0200 Subject: [PATCH] Update deploy script to include dev dependencies during npm installation for backend builds, enhancing reliability of npm ci commands. Adjust fallback mechanism to remove --omit=dev flag for consistent dependency management. --- deploy.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy.sh b/deploy.sh index 11d85a3..90cd6fd 100755 --- a/deploy.sh +++ b/deploy.sh @@ -202,10 +202,10 @@ setup_backend() { npm config set audit false >/dev/null 2>&1 || true npm config set progress false >/dev/null 2>&1 || true npm config set loglevel warn >/dev/null 2>&1 || true - # Schnelle, reproduzierbare Installation nur Prod-Dependencies - timeout 600 bash -lc "npm ci --omit=dev --no-audit --no-fund --silent --loglevel=warn --no-progress" || { + # Backend braucht alle Dependencies (auch dev für Build-Tools) + timeout 600 bash -lc "npm ci --no-audit --no-fund --silent --loglevel=warn --no-progress" || { print_warning "npm ci ist fehlgeschlagen oder hat zu lange gedauert. Versuche fallback ohne timeout..." - npm ci --omit=dev --no-audit --no-fund --silent --loglevel=warn --no-progress || { + npm ci --no-audit --no-fund --silent --loglevel=warn --no-progress || { print_error "npm ci (Backend) fehlgeschlagen"; exit 1; } } @@ -491,9 +491,10 @@ do_update() { npm config set audit false >/dev/null 2>&1 || true npm config set progress false >/dev/null 2>&1 || true npm config set loglevel warn >/dev/null 2>&1 || true - timeout 600 bash -lc "npm ci --omit=dev --no-audit --no-fund --silent --loglevel=warn --no-progress" || { + # Backend braucht alle Dependencies (auch dev für Build-Tools) + timeout 600 bash -lc "npm ci --no-audit --no-fund --silent --loglevel=warn --no-progress" || { print_warning "npm ci ist fehlgeschlagen oder hat zu lange gedauert. Versuche fallback ohne timeout..." - npm ci --omit=dev --no-audit --no-fund --silent --loglevel=warn --no-progress || { + npm ci --no-audit --no-fund --silent --loglevel=warn --no-progress || { print_error "npm ci (Backend Update) fehlgeschlagen"; exit 1; } }