-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
Description:
After upgrading Svelte from an earlier version I'm encountering the invalid_snippet_arguments error in code that previously worked without issues. I suspect this may be related to #15521, but I'm not entirely sure. Getting the error on 5.25.3, and now 5.27.0. To give more insight, in the inspector the error points to a $state()
variable that is not being passed to any snippet at all and inspecting it the variable is updating just fine. If i debug by triggering inspector breakpoints on error caught/uncaught, I get traced to an import of a svelte component that doesn't have nor is used in any snippet.
Problems:
The error message doesn't indicate which snippet is causing the problem.
This makes debugging extremely difficult, especially when the problematic snippet might or might not even be in my own code—it could be coming from a library.
Request:
Can you provide more information about what could be causing this error?
Is there a way to trace which snippet is failing?
Any guidance on how to approach fixing this—especially when third-party code might be involved—would be much appreciated.
Reproduction
Not sure as I can't find what snippet is at fault
Logs
Svelte error: invalid_snippet_arguments
A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
https://svelte.dev/e/invalid_snippet_arguments
in +page.svelte
in +layout.svelte
in +layout.svelte
in root.svelte
....
System Info
System:
OS: macOS 15.3.2
CPU: (8) arm64 Apple M1
Memory: 304.64 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.7.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 10.8.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 135.0.7049.85
Safari: 18.3.1
Severity
blocking all usage of svelte