Skip to content

Svelte 5: svelte_component_invalid_this_value has false positives #12857

Closed
@Conduitry

Description

@Conduitry

Describe the bug

The svelte_component_invalid_this_value error message detects any attempt at calling something that's not a function while instantiating a <svelte:component> as this error. This was especially confusing for me while I was trying to debug a Svelte 4->5 migration issue, because the <svelte:component> it was referring to lived inside SK's generated root component, but the component selected by the router not being a function was not the issue.

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACo2OwQrCQAxEf2XJpQqlva9V8OJPtB6kTXFhN1l2U0FK_92UgiJevGWGN5mZYXQeM9h2BroFBAvnGKEEecZV5Ad6QdWZp9SvTpP75KKcOurEhchJzIXZjImDKapa72oLFYeOmvpDU7P5tmeNEZIYubt8nDWy1EpoS-DBjQ4HsJImXMr3KGX-HUWT97v9d_nv6-vyAgGRF8_7AAAA

Logs

No response

System Info

n/a

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions