{"id":45081,"library":"happn-db-provider-sqlite","title":"Happn DB Provider SQLite","description":"SQLite data provider for the happn database system, version 1.0.10. This package acts as a storage backend using SQLite for happn, a lightweight data layer. It focuses on providing a simple, file-based database solution with low overhead. Updates are infrequent. Compared to other providers, SQLite is ideal for embedded or single-node deployments.","status":"active","version":"1.0.10","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install happn-db-provider-sqlite","lang":"bash","label":"npm"},{"cmd":"yarn add happn-db-provider-sqlite","lang":"bash","label":"yarn"},{"cmd":"pnpm add happn-db-provider-sqlite","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export; named import will fail.","wrong":"import { Provider } from 'happn-db-provider-sqlite'","symbol":"default","correct":"import Provider from 'happn-db-provider-sqlite'"},{"note":"CommonJS users must use .default because the package uses ESM.","wrong":"const Provider = require('happn-db-provider-sqlite')","symbol":"default with require","correct":"const Provider = require('happn-db-provider-sqlite').default"},{"note":"HappnClient comes from the core 'happn' package, not from this provider.","wrong":"import HappnClient from 'happn-db-provider-sqlite'","symbol":"HappnClient","correct":"import { HappnClient } from 'happn'"}],"quickstart":{"code":"import Provider from 'happn-db-provider-sqlite';\nimport { HappnClient } from 'happn';\n\nconst provider = new Provider({\n  filename: './data.sqlite',\n  tableName: 'test'\n});\n\nconst client = new HappnClient({\n  provider: provider\n});\n\nawait client.set('key1', { hello: 'world' });\nconst result = await client.get('key1');\nconsole.log(result); // { hello: 'world' }\n\nawait client.delete('key1');\n\nawait client.disconnect();","lang":"typescript","description":"Initialize a SQLite provider and a happn client to perform basic CRUD operations."},"warnings":[{"fix":"Run `npm install happn` alongside this package.","message":"Requires the `happn` core package as a peer dependency. If not installed, you'll get a missing module error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use `import Provider from 'happn-db-provider-sqlite'`.","message":"v1.0.0 changed the export from named to default. `import { SQLiteProvider }` no longer works.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Remove the `autoCreate` option from the constructor.","message":"Option `autoCreate` is deprecated; tables are always created automatically if they don't exist.","severity":"deprecated","affected_versions":">=1.0.5"},{"fix":"Use a different provider (e.g., PostgreSQL) for concurrent scenarios, or configure SQLite WAL mode manually.","message":"Concurrent writes to the same SQLite file can cause `SQLITE_BUSY` errors. This provider is not designed for high-concurrency multi-process access.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.10':14 'act':17 'backend':21 'base':38 'compar':47 'data':6,28 'databas':11,39 'db':2 'deploy':60 'embed':55 'file':37 'file-bas':36 'focus':31 'happn':1,10,25 'ideal':53 'infrequ':46 'javascript':61 'layer':29 'lightweight':27 'low':42 'node':59 'overhead':43 'packag':16 'provid':3,7,33,50 'simpl':35 'singl':58 'single-nod':57 'solut':40 'sqlite':4,5,23,51 'storag':20 'system':12 'updat':44 'use':22 'version':13","created_at":"2026-06-07T12:53:16.728317+00:00","updated_at":"2026-06-07T12:53:16.728317+00:00","problems":[{"fix":"Install the core package: `npm install happn`","cause":"Missing peer dependency `happn`.","error":"Error: Cannot find module 'happn'"},{"fix":"Use `import Provider from 'happn-db-provider-sqlite'` (not `{ Provider }`)","cause":"Using named import instead of default import.","error":"TypeError: Provider is not a constructor"},{"fix":"Ensure the `tableName` option matches the table in the SQLite file, or allow auto-creation.","cause":"The provider's tableName option does not match the existing table.","error":"SqliteError: no such table: test"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"happn-db-provider-sqlite","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}