{"record":{"id":"3c7c749d4943aeeb","repo":"ruvnet/ruflo","slug":"persistent-cache-sql-js-not-available-cache-dis","errorCode":null,"errorMessage":"[persistent-cache] sql.js not available, cache disabled:","messagePattern":"\\[persistent-cache\\] sql\\.js not available, cache disabled:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/embeddings/src/persistent-cache.ts","lineNumber":126,"sourceCode":"          access_count INTEGER DEFAULT 1\n        )\n      `);\n      this.db.run('CREATE INDEX IF NOT EXISTS idx_accessed_at ON embeddings(accessed_at)');\n      this.db.run('CREATE INDEX IF NOT EXISTS idx_created_at ON embeddings(created_at)');\n\n      // Clean expired entries on startup\n      this.cleanExpired();\n\n      // Save after initialization to persist schema\n      this.saveToFile();\n\n      // Start auto-save timer\n      this.startAutoSave();\n\n      this.initialized = true;\n    } catch (error) {\n      // If sql.js not available, fall back gracefully\n      console.warn('[persistent-cache] sql.js not available, cache disabled:',\n        error instanceof Error ? error.message : error);\n      this.initialized = true; // Mark as initialized to prevent retry\n    }\n  }\n\n  /**\n   * Start auto-save timer\n   */\n  private startAutoSave(): void {\n    if (this.autoSaveTimer) return;\n\n    this.autoSaveTimer = setInterval(() => {\n      if (this.dirty && this.db) {\n        this.saveToFile();\n      }\n    }, this.autoSaveInterval);\n  }\n","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/embeddings/src/persistent-cache.ts#L108-L144","documentation":"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).","triggerScenarios":"Thrown at v3/@claude-flow/embeddings/src/persistent-cache.ts:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install sql.js (npm install sql.js) to enable the persistent embedding cache; without it the cache is disabled and embeddings are recomputed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}