Registry / database / sqlite-vec-windows-x64

sqlite-vec-windows-x64

JSON →
library0.1.9jsnpmunverified

sqlite-vec is a vector search SQLite extension that enables fast nearest neighbor search directly within SQL queries. It supports various distance metrics (cosine, L2, dot product) and allows indexing vectors using IVF (inverted file) with optional product quantization compression. This package is the prebuilt Windows x64 binary for Node.js, installed automatically when `sqlite-vec` is used on that platform. Version 0.1.9 is the current stable release with no release cadence established. Unlike other vector database extensions, sqlite-vec is embedded directly into SQLite, requiring no external server.

npm install sqlite-vec-windows-x64
INSTALL
IMPORT
SIG · SQLITE-VEC-WINDOWS
S
sqlite-vec-windows-x64
databasejavascriptv0.1.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import Database from 'better-sqlite3'
const Database = require('sqlite-vec-windows-x64')
You must import better-sqlite3 to use the extension. The extension is loaded via Database.loadExtension().
loadExtension
db.loadExtension('path/to/vec0')
db.exec('SELECT load_extension(...)')
Use better-sqlite3's loadExtension method, not SQLite's load_extension mechanism.
vec0
db.exec('CREATE VIRTUAL TABLE vec_items USING vec0(embedding float[512] distance_metric=cosine)')
The extension registers the vec0 virtual table module; ensure the extension is loaded before executing such DDL.

Loads the sqlite-vec extension into better-sqlite3, creates a vec0 virtual table, inserts vectors, and performs a cosine similarity search.

import Database from 'better-sqlite3'; import path from 'path'; const db = new Database(':memory:'); // Load the sqlite-vec extension // The .node file is typically at the package root or in node_modules/sqlite-vec-windows-x64 db.loadExtension(path.join(process.cwd(), 'node_modules/sqlite-vec-windows-x64', 'vec0')); // Create a virtual table for vectors db.exec(` CREATE VIRTUAL TABLE vec_items USING vec0( embedding float[512] distance_metric=cosine ); `); // Insert some vectors (embedding length must match) const stmt = db.prepare('INSERT INTO vec_items(rowid, embedding) VALUES (?, ?)'); stmt.run(1, new Float32Array(512).fill(0.1)); // dummy vector stmt.run(2, new Float32Array(512).fill(0.2)); // Perform a vector search const results = db.prepare(` SELECT rowid, distance FROM vec_items WHERE embedding MATCH ? ORDER BY distance LIMIT 5 `).all(new Float32Array(512).fill(0.15)); console.log(results); // rows with distance db.close();
Debug
Known issues
gotchaThe extension binary is platform-specific; on Windows x64 this package is used, but other platforms require different packages (e.g., sqlite-vec-linux-x64).
fix
Install the 'sqlite-vec' meta-package, which will automatically select the correct platform-specific binary.
affects: >=0.1.0
gotchaUsing raw Float32Array for vectors requires exact dimension match; mismatched dimensions will cause errors or incorrect results.
fix
Ensure inserted vectors match the declared dimension in the virtual table definition (e.g., float[512] means 512 floats).
affects: >=0.1.0
gotchaThe extension must be loaded before any vec0-related SQL statements; otherwise you'll get 'no such module: vec0' or similar errors.
fix
Call db.loadExtension() immediately after creating the database.
affects: >=0.1.0
breakingVersion 0.x is unstable; APIs may change without major semver bump. Upgrade with caution.
fix
Pin versions and test thoroughly before upgrading.
affects: >=0.1.0
Errors
Common errors & fixes
Error: The specified module could not be found. \\?\C:\...\node_modules\sqlite-vec-windows-x64\vec0.node
The .node file is missing or not built correctly for the Node.js version/architecture.
fix
Ensure you are on Windows x64 and reinstall the package: 'npm install sqlite-vec-windows-x64'. The .node file should be in the package root.
Error: no such module: vec0
The extension was not loaded before using the vec0 virtual table.
fix
Call db.loadExtension() before executing any DDL that references vec0.
Error: wrong number of columns in embedding (expected 512, got 256)
The inserted Float32Array length does not match the column definition.
fix
Ensure the vector dimension matches the declared float[X] in the virtual table schema.
Error: Bind parameter 2 out of range for INSERT
Trying to bind more than one parameter when only rowid and embedding are expected.
fix
Use the correct number of bind parameters: rowid and embedding (as Float32Array).
Upgrade
Version history
0.1.9latest on npm
Audit
Dependencies
better-sqlite3requiredNeeded to load the extension into a SQLite database instance.
Agent activity
21 hits · last 30 days
node
16
Meta
2
OpenAI (training)
1
Resources
sqlite-vec-windows-x64 — npm install sqlite-vec-windows-x64 · libregistry