fix-playwright-browsers.shā¢1.34 kB
#!/bin/bash
# Fix Playwright browser installation issue
# This resolves the "Executable doesn't exist" error when opening compositions
echo "š§ Fixing Playwright browser installation..."
echo ""
# Change to project directory
cd "$(dirname "$0")/.."
# Check if node_modules exists
if [ ! -d "node_modules" ]; then
echo "ā Error: node_modules not found. Please run 'npm install' first."
exit 1
fi
# Install Playwright browsers
echo "š„ Installing Playwright browsers..."
npx playwright install chromium
if [ $? -eq 0 ]; then
echo ""
echo "ā
Playwright browsers installed successfully!"
echo ""
echo "šÆ You can now use the browser automation feature to open compositions."
echo ""
echo "š” Tips:"
echo " - The browser will open automatically when saving compositions"
echo " - If you still see errors, try running: npm run postinstall"
echo " - For manual browser opening, use the provided URL"
else
echo ""
echo "ā Failed to install Playwright browsers."
echo ""
echo "š Troubleshooting:"
echo " 1. Check your internet connection"
echo " 2. Try running with sudo: sudo npx playwright install chromium"
echo " 3. Clear npm cache: npm cache clean --force"
echo " 4. Reinstall dependencies: rm -rf node_modules && npm install"
fi