{"record":{"id":"74741ef9fb4c37a9","repo":"pubkey/rxdb","slug":"db14","errorCode":"DB14","errorMessage":"RxDB Error-Code: DB14. Hint: Error messages are not included in RxDB core to reduce build size. To show the full error messages and to ensure that you do not make any mistakes when using RxDB, use the dev-mode plugin when you are in development mode: https://rxdb.info/dev-mode.html?console=error","messagePattern":"RxDB Error-Code: DB14\\. Hint: Error messages are not included in RxDB core to reduce build size\\. To show the full error messages and to ensure that you do not make any mistakes when using RxDB, use the dev-mode plugin when you are in development mode: https://rxdb\\.info/dev-mode\\.html\\?console=error","errorType":"error_code","errorClass":"RxError","httpStatus":null,"severity":"error","filePath":"src/rx-database.ts","lineNumber":212,"sourceCode":"        }\n    }\n\n    get $(): Observable<RxChangeEvent<any>> {\n        return this.observable$;\n    }\n\n    /**\n     * Emits events whenever a JavaScript instance\n     * of RxCollection is added or removed on the RxDatabase instance.\n     * Does not emit anything across browser-tabs!\n     */\n    get collections$(): Observable<RxCollectionEvent> {\n        return this.collectionsSubject$.asObservable();\n    }\n\n    public getReactivityFactory(): RxReactivityFactory<Reactivity> {\n        if (!this.reactivity) {\n            throw newRxError('DB14', { database: this.name });\n        }\n        return this.reactivity;\n    }\n\n    public _subs: Subscription[] = [];\n\n    /**\n     * Because having unhandled exceptions would fail,\n     * we have to store the async errors of the constructor here\n     * so we can throw them later.\n     */\n    public startupErrors: (RxError | RxTypeError)[] = [];\n\n    /**\n     * When the database is closed,\n     * these functions will be called an awaited.\n     * Used to automatically clean up stuff that\n     * belongs to this collection.","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/pubkey/rxdb/blob/af6fb65f94cd70558d74c23799eda11ff1c15224/src/rx-database.ts#L194-L230","documentation":"DB14 is thrown by getReactivityFactory() when the database was created without a reactivity factory. RxDB only wires up a reactivity library (e.g. RxJS, signals, Vue, Svelte) when you pass the `reactivity` option to createRxDatabase or add the corresponding reactivity plugin. Without it, reactive state APIs have no underlying library to use.","triggerScenarios":"Calling db.getReactivityFactory() (directly or indirectly via RxState/other reactivity-based features) on a database created without the `reactivity` option in createRxDatabase options.","commonSituations":"Using the RxState plugin or reactive queries after creating the database with createRxDatabase({ ... }) but forgetting `reactivity: rxjs` (or another adapter); copying a database factory that omits the option; switching databases in dev/test setups where the option was dropped.","solutions":["Pass a reactivity adapter when creating the database: createRxDatabase({ name, storage, reactivity: rxjs }).","Import the adapter from its plugin package (e.g. rxdb/plugins/reactivity-rxjs or your own RxReactivityFactory implementation) and assign it.","If you do not need reactivity, avoid calling getReactivityFactory()/reactive features instead of adding the adapter."],"exampleFix":"// before\nconst db = await createRxDatabase({ name: 'mydb', storage: getRxStorageDexie() });\n// after\nimport { rxjs } from 'rxdb/plugins/reactivity-rxjs';\nconst db = await createRxDatabase({ name: 'mydb', storage: getRxStorageDexie(), reactivity: rxjs });","handlingStrategy":"validation","validationCode":"import { rxjs } from 'rxdb/plugins/reactivity-rxjs';\nconst db = await createRxDatabase({ name: 'mydb', storage, reactivity: rxjs });","typeGuard":"function hasReactivity(db: RxDatabase): boolean {\n  return 'reactivity' in db && db.reactivity != null;\n}","tryCatchPattern":"try {\n  const factory = db.getReactivityFactory();\n} catch (err) {\n  if (isRxError(err) && err.code === 'DB14') {\n    console.error('Database created without a reactivity adapter; pass reactivity option in createRxDatabase');\n  } else {\n    throw err;\n  }\n}","preventionTips":["Always pass the `reactivity` option in a shared createDatabase() helper so every code path has it.","Match the adapter to your framework (RxJS, signals, Vue, Svelte).","Add an early smoke test that calls getReactivityFactory() at startup."],"tags":["configuration","reactivity","missing-plugin"],"backgroundTag":"missing-reactivity-adapter","analyzedSha":"af6fb65f94cd70558d74c23799eda11ff1c15224","analyzedAt":"2026-08-31T23:32:37.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}