Bug Report
CLI Version: 0.2.26
Node.js: v20.20.2
Platform: WSL (Ubuntu 24.04)
Problem
All CLI commands that open an existing database fail with:
✖ Failed to load database
db.load is not a function
Affected commands: stats, search, insert, export, import
Steps to Reproduce
- Run the demo to create a database:
npx ruvector demo --basic
- Try to use the database:
npx ruvector stats ./demo.db
npx ruvector search ./demo.db --vector "[0.8, 0.6, 0, 0]"
npx ruvector export ./demo.db -o out.json
All fail with "db.load is not a function"
What Works
-
npx ruvector demo --basic works (uses internal code path)
-
The Node.js API works correctly:
const { VectorDB } = require('ruvector');
const db = new VectorDB({ dimensions: 4, storagePath: './test.db' });
await db.insert({ vector: [1,0,0,0], metadata: { label: 'x-axis' } });
const results = await db.search({ vector: [0.8,0.6,0,0], k: 3 });
-
npx ruvector doctor reports all checks passing
Conclusion
The native bindings work correctly via the JS API. The CLI's database
load path appears to be calling a method that doesn't exist on the
VectorDB instance.
Bug Report
CLI Version: 0.2.26
Node.js: v20.20.2
Platform: WSL (Ubuntu 24.04)
Problem
All CLI commands that open an existing database fail with:
✖ Failed to load database
db.load is not a function
Affected commands:
stats,search,insert,export,importSteps to Reproduce
npx ruvector demo --basic
npx ruvector stats ./demo.db
npx ruvector search ./demo.db --vector "[0.8, 0.6, 0, 0]"
npx ruvector export ./demo.db -o out.json
All fail with "db.load is not a function"
What Works
npx ruvector demo --basicworks (uses internal code path)The Node.js API works correctly:
const { VectorDB } = require('ruvector');
const db = new VectorDB({ dimensions: 4, storagePath: './test.db' });
await db.insert({ vector: [1,0,0,0], metadata: { label: 'x-axis' } });
const results = await db.search({ vector: [0.8,0.6,0,0], k: 3 });
npx ruvector doctorreports all checks passingConclusion
The native bindings work correctly via the JS API. The CLI's database
load path appears to be calling a method that doesn't exist on the
VectorDB instance.