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.
This commit is contained in:
11
deploy.sh
11
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user