From b6eef5100f22624b5deb355a2b469f0ef2bfef81 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 4 Dec 2025 17:14:36 +0100 Subject: [PATCH] Update fix-dependencies.sh to use --legacy-peer-deps during npm install and add client build and file copy steps for improved deployment process. --- fix-dependencies.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/fix-dependencies.sh b/fix-dependencies.sh index 0da9279..6dd340e 100755 --- a/fix-dependencies.sh +++ b/fix-dependencies.sh @@ -46,7 +46,7 @@ echo "✓ Root-Dependencies installiert" # Installiere Client-Dependencies echo "" echo "Installiere Client-Dependencies..." -sudo -u $USER bash -c "cd '$TARGET_DIR/client' && HOME='$TARGET_DIR' npm config set cache '$NPM_CACHE_DIR' && npm install" +sudo -u $USER bash -c "cd '$TARGET_DIR/client' && HOME='$TARGET_DIR' npm config set cache '$NPM_CACHE_DIR' && npm install --legacy-peer-deps" if [ $? -ne 0 ]; then echo "FEHLER: Installation der Client-Dependencies fehlgeschlagen!" @@ -55,6 +55,28 @@ fi echo "✓ Client-Dependencies installiert" +# Baue Client +echo "" +echo "Baue Client für Production..." +sudo -u $USER bash -c "cd '$TARGET_DIR' && HOME='$TARGET_DIR' npm config set cache '$NPM_CACHE_DIR' && npm run build" + +if [ $? -ne 0 ]; then + echo "FEHLER: Build fehlgeschlagen!" + exit 1 +fi + +echo "✓ Client gebaut" + +# Kopiere dist nach docroot +echo "" +echo "Kopiere gebaute Dateien nach docroot..." +if [ -d "$TARGET_DIR/docroot/dist" ]; then + rm -rf "$TARGET_DIR/docroot/dist" +fi +cp -r "$TARGET_DIR/client/dist" "$TARGET_DIR/docroot/" +chown -R $USER:$GROUP "$TARGET_DIR/docroot/dist" +echo "✓ Dateien kopiert" + # Setze Besitzer für node_modules echo "" echo "Setze Besitzer für node_modules..."