()
| 44 | // Module Instance Errors |
| 45 | export class DuplicateDbInstanceError extends TanStackDBError { |
| 46 | constructor() { |
| 47 | super( |
| 48 | `Multiple instances of @tanstack/db detected!\n\n` + |
| 49 | `This causes transaction context to be lost because each instance maintains ` + |
| 50 | `its own transaction stack.\n\n` + |
| 51 | `Common causes:\n` + |
| 52 | `1. Different versions of @tanstack/db installed\n` + |
| 53 | `2. Incompatible peer dependency versions in packages\n` + |
| 54 | `3. Module resolution issues in bundler configuration\n\n` + |
| 55 | `To fix:\n` + |
| 56 | `1. Check installed versions: npm list @tanstack/db (or pnpm/yarn list)\n` + |
| 57 | `2. Force a single version using package manager overrides:\n` + |
| 58 | ` - npm: "overrides" in package.json\n` + |
| 59 | ` - pnpm: "pnpm.overrides" in package.json\n` + |
| 60 | ` - yarn: "resolutions" in package.json\n` + |
| 61 | `3. Clear node_modules and lockfile, then reinstall\n\n` + |
| 62 | `To temporarily disable this check (not recommended):\n` + |
| 63 | `Set environment variable: TANSTACK_DB_DISABLE_DUP_CHECK=1\n\n` + |
| 64 | `See: https://tanstack.com/db/latest/docs/troubleshooting#duplicate-instances`, |
| 65 | ) |
| 66 | this.name = `DuplicateDbInstanceError` |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | // Collection Configuration Errors |
nothing calls this directly
no outgoing calls
no test coverage detected