{"id":18450,"library":"jembadb","title":"JembaDb","description":"JembaDb is a tiny, embeddable, append-only JSON database for Node.js v16.16.0+. Current version 5.1.7, actively maintained. Unlike full-featured databases, it focuses on simplicity: append-only logging and in-memory queries. Ideal for small projects, configuration, or logging scenarios where a full database is overkill.","status":"active","version":"5.1.7","language":"javascript","source_language":"en","source_url":"git://github.com/bookpauk/jembadb","tags":["javascript","JavaScript","Json","Database"],"install":[{"cmd":"npm install jembadb","lang":"bash","label":"npm"},{"cmd":"yarn add jembadb","lang":"bash","label":"yarn"},{"cmd":"pnpm add jembadb","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package, no CJS support.","wrong":"const JembaDb = require('jembadb')","symbol":"default","correct":"import JembaDb from 'jembadb'"},{"note":"Default export only.","wrong":"import { JembaDb } from 'jembadb'","symbol":"JembaDb","correct":"import JembaDb from 'jembadb'"},{"note":"Use `import type` for TypeScript type-only imports.","wrong":"import JembaDb from 'jembadb'","symbol":"type","correct":"import type JembaDb from 'jembadb'"}],"quickstart":{"code":"import JembaDb from 'jembadb';\nconst db = new JembaDb();\nawait db.insert({ id: 1, name: 'test' });\nconst results = await db.query({ id: 1 });\nconsole.log(results);\nawait db.close();","lang":"typescript","description":"Shows basic usage: initialize, insert, query, and close."},"warnings":[{"fix":"Switch to ESM with `import JembaDb from 'jembadb'`.","message":"CJS require() is not supported; use ESM import.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Use `query()` to find latest entry or implement versioning.","message":"Database is append-only; updates mean appending new entries, not in-place modification.","severity":"gotcha","affected_versions":"*"},{"fix":"Replace `db.find(...)` with `db.query(...)`.","message":"Old `find()` method replaced by `query()`.","severity":"deprecated","affected_versions":">=5.0.0 <5.1.0"},{"fix":"Upgrade Node.js to 16.16.0+.","message":"Node.js >=16.16.0 required.","severity":"breaking","affected_versions":">=5.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use `import JembaDb from 'jembadb'` or set `\"type\": \"module\"` in package.json.","cause":"Using CommonJS require with an ESM-only package.","error":"TypeError: JembaDb is not a constructor"},{"fix":"Switch to ESM: rename file to .mjs or add `\"type\": \"module\"`.","cause":"Attempting to require the package in a CommonJS file.","error":"ERR_REQUIRE_ESM"},{"fix":"Run `npm install jembadb` and verify import path.","cause":"Package not installed or wrong import path.","error":"Cannot find module 'jembadb'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}