Skip to content

Svelte 5: Better effect_update_depth_exceeded error, show effect location #13950

@KieranP

Description

@KieranP

Describe the bug

In the process of migration a large app to Svelte 5. Started seeing a ton of effect_update_depth_exceeded errors when running tests (which if I understand correctly means I'm updating state inside of an $effect, which triggers that $effect again, creating a loop?). But there is no information in the error message about which $effect is causing the issue, so I'm having a hard time hunting down the offending effects. Also, these showed up after bumping Svelte package versions, and I don't see anything mentioning this in the upgrades notes, so possible undocumented breaking change.

Reproduction

See above

Logs

No response

System Info

System:
    OS: macOS 15.0.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 259.27 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.1 - ~/.asdf/installs/nodejs/20.15.1/bin/node
    Yarn: 4.3.1 - ~/.asdf/installs/nodejs/20.15.1/bin/yarn
    npm: 10.8.2 - ~/.asdf/plugins/nodejs/shims/npm
    bun: 1.1.0 - ~/.bun/bin/bun
  Browsers:
    Chrome: 130.0.6723.70
    Safari: 18.0.1
  npmPackages:
    svelte: ^5.1.0 => 5.1.0

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions