You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
errors encountered during build (e.g. when reading config, or when a page fails to render) are kinda ugly. pretty sure we could make them way nicer quite easily
Showing a stack trace that is purely internal SvelteKit stuff is totally unnecessary — the user can't do anything with it, we should just print a bold red message.
For certain errors like the options validation that makes sense, for others having the stack trace - even if it leads into internals - is very helpful. You get something to start at.
Stack trace aside, the path to the file causing the build error should be printed.
The messages can be rather useless sometimes, e.g.
CompileError: Block was left open
This could be anywhere.
Broke something among dozens of components and had to start the build itself in debug mode to find out which component was actually responsible (via a breakpoint in compileSvelte within the Vite plugin).
Looks like svelte-check can help out as well, it points to the file and shows the exact location. The build output should ideally do the same.
Activity
dummdidumm commentedon Dec 13, 2023
Ugly in what sense? And what would make them nicer?
Rich-Harris commentedon Dec 13, 2023
Stuff like this:
Showing a stack trace that is purely internal SvelteKit stuff is totally unnecessary — the user can't do anything with it, we should just print a bold red message.
dummdidumm commentedon Dec 13, 2023
For certain errors like the options validation that makes sense, for others having the stack trace - even if it leads into internals - is very helpful. You get something to start at.
brunnerh commentedon Sep 4, 2024
Stack trace aside, the path to the file causing the build error should be printed.
The messages can be rather useless sometimes, e.g.
This could be anywhere.
Broke something among dozens of components and had to start the build itself in debug mode to find out which component was actually responsible (via a breakpoint in
compileSveltewithin the Vite plugin).Looks like
svelte-checkcan help out as well, it points to the file and shows the exact location. The build output should ideally do the same.feat: better error messages (#16374)