ruvnet/ruflo · error

[persistent-cache] sql.js not available, cache disabled:

Error message

[persistent-cache] sql.js not available, cache disabled:

What it means

Log warning in ensureInitialized: sql.js could not be loaded or the SQLite schema initialized, so the persistent embedding cache disables itself and callers operate without persistence (in-memory only).

Source

Thrown at v3/@claude-flow/embeddings/src/persistent-cache.ts:126

          access_count INTEGER DEFAULT 1
        )
      `);
      this.db.run('CREATE INDEX IF NOT EXISTS idx_accessed_at ON embeddings(accessed_at)');
      this.db.run('CREATE INDEX IF NOT EXISTS idx_created_at ON embeddings(created_at)');

      // Clean expired entries on startup
      this.cleanExpired();

      // Save after initialization to persist schema
      this.saveToFile();

      // Start auto-save timer
      this.startAutoSave();

      this.initialized = true;
    } catch (error) {
      // If sql.js not available, fall back gracefully
      console.warn('[persistent-cache] sql.js not available, cache disabled:',
        error instanceof Error ? error.message : error);
      this.initialized = true; // Mark as initialized to prevent retry
    }
  }

  /**
   * Start auto-save timer
   */
  private startAutoSave(): void {
    if (this.autoSaveTimer) return;

    this.autoSaveTimer = setInterval(() => {
      if (this.dirty && this.db) {
        this.saveToFile();
      }
    }, this.autoSaveInterval);
  }

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Install sql.js (npm install sql.js) to enable the persistent embedding cache; without it the cache is disabled and embeddings are recomputed.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/@claude-flow/embeddings/src/persistent-cache.ts:126 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/3c7c749d4943aeeb. Report an issue: GitHub.