sveltejs / svelte · Issue No. 18522
In versions 5.53.12 and later. Works in 5.53.11.
Gives error:
null is not an object (evaluating 'batch.transfer_effects') in <unknown>
Happens in async and non-async modes.
May be related to https://github.com/sveltejs/svelte/issues/18209
Simple reproduction in playground:
Seems to be fixed if you add at least one $effect block:
But not if you use an $effect.pre:
And calling flushSync() if you have an $effect.pre block doesn’t actually run the effect, and then breaks future reactivity (also in 5.53.11):
Interestingly, flushSync works if it’s not called from the top level of the script, but instead e.g. with a button handler:
Or if you wrap the flushSync() call in queueMicrotask:
System:
OS: macOS 15.7.7
CPU: (10) arm64 Apple M1 Max
Memory: 409.16 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.14.1 - /Users/jace/.nvm/versions/node/v24.14.1/bin/node
npm: 11.11.0 - /Users/jace/.nvm/versions/node/v24.14.1/bin/npm
Deno: 2.8.2 - /opt/homebrew/bin/deno
Browsers:
Brave Browser: 150.1.92.138
Chrome: 145.0.7632.117
Firefox: 128.0
Safari: 26.5
npmPackages:
rollup: ^4.0.0 => 4.61.1
svelte: ^5.0.0 => 5.56.3
annoyance
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.