From 58b136fa84f1ff133911d1b5680cab72894f4670 Mon Sep 17 00:00:00 2001 From: kleap-admin Date: Fri, 16 Jan 2026 15:56:40 +0000 Subject: [PATCH] Update build-wrapper.sh --- build-wrapper.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build-wrapper.sh diff --git a/build-wrapper.sh b/build-wrapper.sh new file mode 100644 index 0000000..b466a62 --- /dev/null +++ b/build-wrapper.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# BUILD WRAPPER - Optimized for constrained environments +# Uses less memory by disabling type checks during the heavy "Collecting page data" phase + +set -e # Exit on any error + +echo "🚀 Starting build..." + +# Ensure we are building in the right mode +echo "Attempting build with optimizations..." +# Reduced memory limit to avoid being killed by the container, and disabled linting/typechecking +NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS="--max-old-space-size=2048" NEXT_SKIP_TYPE_CHECK=1 NEXT_SKIP_LINTING=1 npx next build + +# Verify build output exists +if [ -d ".next" ]; then + echo "✅ .next directory found." + ls -la .next | head -n 10 +else + echo "❌ Error: .next directory NOT found after build!" + exit 1 +fi + +echo "✅ Build succeeded!" +exit 0