Describe the bug
TanStack Svelte DB is incompatible with Svelte 5's async compiler option due to calling flushSync() inside an effect, which violates its reactivity constraints:
The bug that this triggers:
Uncaught Svelte error: flush_sync_in_effect Cannot use flushSync inside an effect
See https://svelte.dev/e/flush_sync_in_effect
To Reproduce
Steps to reproduce the behavior:
- Enable async compiler in
svelte.config.js
- Use
useLiveQuery in any component
- Navigate to the page → Error occurs during collection initialization
Desktop (please complete the following information):