Files
crowd-funder-for-time-pwa/scripts/setup-electron.sh
Matthew Raymer 6e0e0cd6b5 WIP: Fix Electron TypeScript compilation and SQLite configuration
- Fixed TypeScript configuration in electron/tsconfig.json:
  * Added skipLibCheck: true to resolve node_modules type conflicts
  * Added allowSyntheticDefaultImports for better module compatibility
  * Disabled strict mode to avoid unnecessary type errors
  * Updated TypeScript version to ~5.2.2 for consistency

- Resolved SQLite plugin configuration issue:
  * Changed plugin key from 'SQLite' to 'CapacitorSQLite' in capacitor.config.json
  * This fixes 'Cannot read properties of undefined (reading electronIsEncryption)' error
  * All 45+ SQLite plugin methods now properly registered and available

- Added Electron development scripts:
  * electron-dev.sh for streamlined development workflow
  * setup-electron.sh for initial Electron environment setup

- Electron app now starts successfully without TypeScript compilation errors
- SQLite plugin fully functional with proper configuration access

Status: Electron platform now working for TimeSafari development
2025-06-26 08:06:56 +00:00

30 lines
733 B
Bash
Executable File

#!/bin/bash
# TimeSafari Electron Setup Script
# This script installs all required dependencies for the Electron platform
set -e
echo "🔧 Setting up Electron dependencies..."
# Navigate to electron directory
cd electron
# Install required dependencies for Capacitor SQLite plugin
echo "📦 Installing better-sqlite3-multiple-ciphers..."
npm install better-sqlite3-multiple-ciphers
echo "📦 Installing electron-json-storage..."
npm install electron-json-storage
# Rebuild native modules
echo "🔨 Rebuilding native modules..."
npm run build
echo "✅ Electron setup complete!"
echo ""
echo "To run the Electron app:"
echo " npm run electron:start"
echo ""
echo "Or from the project root:"
echo " npm run electron:dev"