Troubleshooting
Troubleshooting Guide
Section titled “Troubleshooting Guide”This guide covers common issues you might encounter with Thought Ledger and their solutions.
Installation Issues
Section titled “Installation Issues”Ollama Installation Fails
Section titled “Ollama Installation Fails”Problem: Ollama installation script fails or doesn’t complete.
Solutions:
# Try manual installation# macOSbrew install ollama
# Linuxcurl -L https://ollama.com/download/ollama-linux-amd64 -o ollamachmod +x ollamasudo mv ollama /usr/local/bin/
# Start Ollama serviceollama serveCheck system requirements:
- Ensure you have admin/sudo privileges
- Check if ports 11434 are available
- Verify sufficient disk space (5GB+)
Node.js Version Incompatible
Section titled “Node.js Version Incompatible”Problem: Thought Ledger requires Node.js 18+ but you have an older version.
Solution:
# Using nvm (recommended)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashnvm install 18nvm use 18
# Verify installationnode --version # Should show v18.x.xDependencies Won’t Install
Section titled “Dependencies Won’t Install”Problem: npm install fails with errors.
Solutions:
# Clear npm cachenpm cache clean --force
# Delete node_modules and package-lock.jsonrm -rf node_modules package-lock.json
# Reinstall dependenciesnpm install
# If still failing, try with legacy peer depsnpm install --legacy-peer-depsRuntime Issues
Section titled “Runtime Issues”Thought Ledger Won’t Start
Section titled “Thought Ledger Won’t Start”Problem: Application fails to start or shows errors.
Diagnostics:
# Check if Ollama is runningollama list
# Check available portsnetstat -an | grep 3000netstat -an | grep 11434
# Check system resourcesfree -h # Memorydf -h # Disk spaceCommon Solutions:
# Kill existing processespkill -f thought-ledgerpkill -f ollama
# Restart Ollamaollama serve
# Start Thought Ledgernpm startAI Model Not Responding
Section titled “AI Model Not Responding”Problem: AI assistance is slow or doesn’t respond.
Diagnostics:
# Check Ollama statusollama ps
# Test model directlyollama run llama3.2:3b "Hello, test message"
# Check model is downloadedollama listSolutions:
# Redownload model if corruptedollama pull llama3.2:3b
# Try a smaller model if memory is lowollama pull llama3.2:1b
# Restart Ollama servicepkill -f ollama && ollama serveMemory Issues
Section titled “Memory Issues”Problem: Application crashes or becomes unresponsive due to memory.
Solutions:
# Check memory usagefree -hps aux --sort=-%mem | head
# Use smaller AI modelollama pull llama3.2:1b
# Update configuration to use smaller modelecho '{"ai":{"model":"llama3.2:1b"}}' > config.json
# Restart with increased Node.js memoryNODE_OPTIONS="--max-old-space-size=4096" npm startDatabase Issues
Section titled “Database Issues”Database Won’t Initialize
Section titled “Database Won’t Initialize”Problem: SQLite database fails to create or open.
Diagnostics:
# Check data directory permissionsls -la data/ls -la data/decisions.db
# Test database creationsqlite3 data/test.db "CREATE TABLE test (id INTEGER);"Solutions:
# Create data directory if missingmkdir -p data
# Fix permissionschmod 755 data/
# Remove corrupted database and restartrm data/decisions.dbnpm startDecision Search Not Working
Section titled “Decision Search Not Working”Problem: Search functionality returns no results or errors.
Diagnostics:
# Check database contentsqlite3 data/decisions.db "SELECT COUNT(*) FROM decisions;"
# Check search indexsqlite3 data/decisions.db ".schema"Solutions:
# Rebuild search indexnpm run rebuild-index
# Clear cache and restartrm -rf .cache/npm startPerformance Issues
Section titled “Performance Issues”Slow AI Response Times
Section titled “Slow AI Response Times”Problem: AI assistance takes too long to respond.
Solutions:
# Check system resourceshtop # CPU usagefree -h # Memory usage
# Optimize for your hardware:# 8GB RAM or less:ollama pull llama3.2:1b
# 16GB RAM:ollama pull llama3.2:3b
# 32GB+ RAM:ollama pull llama3.2:8bInterface Lag or Freezing
Section titled “Interface Lag or Freezing”Problem: Web interface becomes slow or unresponsive.
Diagnostics:
# Check browser console for errors# Open developer tools (F12) and check Console tab
# Check network requests# Network tab in developer toolsSolutions:
# Clear browser cache and cookies# Try a different browser
# Restart applicationpkill -f thought-ledgernpm startConfiguration Issues
Section titled “Configuration Issues”Settings Not Saving
Section titled “Settings Not Saving”Problem: Configuration changes don’t persist after restart.
Solutions:
# Check config file permissionsls -la config.json
# Ensure writable permissionschmod 644 config.json
# Verify config formatcat config.json | python3 -m json.toolModel Selection Not Working
Section titled “Model Selection Not Working”Problem: Can’t switch between AI models.
Diagnostics:
# Check available modelsollama list
# Check current configurationcat config.json | grep modelSolutions:
# Update configuration manuallynano config.json
# Example configuration:{ "ai": { "model": "llama3.2:3b", "ollama_url": "http://localhost:11434" }}
# Restart applicationnpm startNetwork Issues
Section titled “Network Issues”Port Conflicts
Section titled “Port Conflicts”Problem: Ports 3000 or 11434 are already in use.
Diagnostics:
# Check what's using the portslsof -i :3000lsof -i :11434Solutions:
# Kill conflicting processessudo kill -9 <PID>
# Or use different portsPORT=3001 npm startOllama Connection Failed
Section titled “Ollama Connection Failed”Problem: Thought Ledger can’t connect to Ollama service.
Diagnostics:
# Test Ollama directlycurl http://localhost:11434/api/tags
# Check if Ollama is runningps aux | grep ollamaSolutions:
# Restart Ollamapkill -f ollamaollama serve
# Check firewall settings# Ensure port 11434 is not blockedData Recovery
Section titled “Data Recovery”Lost Decision Data
Section titled “Lost Decision Data”Problem: Decision history disappeared or corrupted.
Solutions:
# Check for database backupsls -la data/*.db.*ls -la backups/
# Restore from backup if availablecp backups/decisions.db.backup data/decisions.db
# Export what you can recovernpm run export-dataCorrupted Database
Section titled “Corrupted Database”Problem: Database file is corrupted and won’t open.
Solutions:
# Try database repairsqlite3 data/decisions.db ".recover" | sqlite3 data/decisions_repaired.db
# If repair fails, start fresh (data loss warning!)mv data/decisions.db data/decisions.db.corruptednpm startGetting Help
Section titled “Getting Help”Debug Mode
Section titled “Debug Mode”Enable detailed logging for troubleshooting:
# Start with debug loggingDEBUG=thought-ledger:* npm start
# Check log filestail -f logs/app.logtail -f logs/error.logSystem Information Report
Section titled “System Information Report”Generate a system report for support:
# Create system reportnpm run system-report
# This creates:# - Hardware information# - Software versions# - Configuration details# - Recent log entriesCommunity Support
Section titled “Community Support”- GitHub Issues: Report bugs
- Discussions: Ask questions
- Documentation: Check latest docs
Contact Support
Section titled “Contact Support”If you continue to experience issues:
- Generate system report:
npm run system-report - Collect error logs: Check
logs/error.log - Describe the issue: Include steps to reproduce
- Contact: support@thought-ledger.com
Still having issues? Our community is active and ready to help. Don’t hesitate to reach out!