Update build-wrapper-smart.sh

This commit is contained in:
kleap-admin 2026-01-16 16:41:47 +00:00
parent eb890b80ad
commit db24a6aab5
1 changed files with 26 additions and 0 deletions

26
build-wrapper-smart.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# SMART BUILD WRAPPER - Show errors but still deploy
echo "🚀 Starting build..."
# Try normal build and capture output
BUILD_OUTPUT=$(npm run build:normal 2>&1)
BUILD_EXIT=$?
if [ $BUILD_EXIT -eq 0 ]; then
echo "✅ Build succeeded!"
exit 0
fi
# Build failed - show the FULL error
echo ""
echo "❌ BUILD FAILED with exit code: $BUILD_EXIT"
echo ""
echo "📋 Full error output:"
echo "$BUILD_OUTPUT"
echo ""
echo "⚠️ Using emergency mode as fallback..."
# Let the package.json fallback handle emergency
exit 1