Update scripts/install-deps.sh

This commit is contained in:
kleap-admin 2026-01-15 14:29:18 +00:00
parent 2f017dcace
commit d9999e8142
1 changed files with 39 additions and 0 deletions

39
scripts/install-deps.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
# AUTO-INSTALL MISSING DEPENDENCIES SCRIPT
# This runs when dependencies are missing in CodeSandbox
echo "📦 Auto-installing missing dependencies..."
# Check if react-wrap-balancer is installed
if ! npm list react-wrap-balancer >/dev/null 2>&1; then
echo "Installing react-wrap-balancer..."
npm install --save react-wrap-balancer@latest --legacy-peer-deps --no-audit --no-fund || true
fi
# Check if cobe is installed
if ! npm list cobe >/dev/null 2>&1; then
echo "Installing cobe..."
npm install --save cobe@latest --legacy-peer-deps --no-audit --no-fund || true
fi
# Check if sharp is installed
if ! npm list sharp >/dev/null 2>&1; then
echo "Installing sharp..."
npm install --save sharp@latest --legacy-peer-deps --no-audit --no-fund || true
fi
# Check if fast-glob is installed
if ! npm list fast-glob >/dev/null 2>&1; then
echo "Installing fast-glob..."
npm install --save fast-glob@latest --legacy-peer-deps --no-audit --no-fund || true
fi
# Check if reading-time is installed
if ! npm list reading-time >/dev/null 2>&1; then
echo "Installing reading-time..."
npm install --save reading-time@latest --legacy-peer-deps --no-audit --no-fund || true
fi
echo "✅ Dependencies check complete!"
exit 0