learn.svelte.dev
learn.svelte.dev copied to clipboard
Error messages should indicate where the error happened
Describe the problem
I'm doin the tutorial and forgot to either remove the second quotation mark or to insert one before the curly braces <img src={src}" />
I just started using Svelte and I'm seeing this a lot that errors don't point me directly to where they occurred:
Describe the proposed solution
Something like:
Error: "Unexpected end of input" in App.svelte [5]
<img src={src}" />
^
Alternatives considered
VS Code provides this IntelliSense error:
Expected > svelte (unexpected-token)
This would also be acceptable as long as I can tell in which component and on which line I should be looking :)
Importance
i cannot use svelte without it
The compiler itself does reveal information about that. There are a few different things that could be going on here. I don't know whether this is a learn.svelte.dev-specific issue, or whether it's a Vite plugin/overlay issue, or what.
I'm seeing this sort of thing locally as well. @dominikg Is this something that you would expect the Vite plugin to support? (Is that where this information would be coming from?)
It's working fine for me in a Vite project:
Maybe it's an issue with learn.svelte.dev
Yes, this looks like the setup in learn.svelte.dev being a bit special. If i remember correctly there's more than one instance instance and if the error is happening on the other one it might cause that.
Transferring to the learn.svelte.dev repo.