Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
openDB
✓ import { openDB } from 'taladb'
✗ import openDB from 'taladb'
Named export, not default. Since v0.1.0.
runMigrations
✓ import { runMigrations } from 'taladb'
✗ const runMigrations = require('taladb').runMigrations
ESM-only package — do not use require().
type Collection
✓ import type { Collection } from 'taladb'
✗ import { Collection } from 'taladb'
Collection is a TypeScript type, not a runtime value. Use type import when not using instances.
TalaDB
✓ import type { TalaDB } from 'taladb'
TalaDB is the type of the database object returned by openDB().
Opens a database, runs a schema migration, creates an index, inserts/finds/updates documents, then closes.
import { openDB, runMigrations } from 'taladb';
async function main() {
const db = await openDB('quickstart.db');
// Run migrations
await runMigrations(db, [
{
fromVersion: 0,
toVersion: 1,
description: 'add default role',
async up(col) {
await col('users').updateMany({}, { $set: { role: 'viewer' } });
},
},
]);
const users = db.collection('users');
// Create index
await users.createIndex('email');
// Insert
const id = await users.insert({ name: 'Alice', email: 'alice@example.com', age: 30 });
console.log('Inserted with id:', id);
// Find one
const alice = await users.findOne({ email: 'alice@example.com' });
console.log('Found:', alice);
// Update
await users.updateOne({ email: 'alice@example.com' }, { $inc: { age: 1 } });
// Find all adults
const adults = await users.find({ age: { $gte: 18 } });
console.log('Adults:', adults);
await db.close();
}
main().catch(console.error);
Errors
Common errors & fixes
Cannot find module '@taladb/web' (or '@taladb/node', '@taladb/react-native')
Platform-specific backend package not installed alongside taladb.
fixInstall the appropriate package: npm install @taladb/web (for browser), @taladb/node (for Node.js), or @taladb/react-native (for React Native).
require() of ES Module taladb from not supported
Using CommonJS require() to import an ESM-only package.
fixConvert to ES modules: use import statements and set 'type': 'module' in your package.json, or use dynamic import() inside a CommonJS file.
Error: This constructor is no longer supported. Use openDB() instead.
Using the deprecated new Database() constructor removed in v0.6.0.
fixReplace with: const db = await openDB('name'); Audit
Dependencies
@taladb/weboptionalRequired for browser/WASM platform backend
@taladb/nodeoptionalRequired for Node.js native module backend
@taladb/react-nativeoptionalRequired for React Native JSI TurboModule backend