Skip to content

nicer error logging #11291

Closed
Closed

Description

@Rich-Harris

Describe the problem

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

Describe the proposed solution

nicer errors

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Activity

  1. added this to the 2.0 milestone on Dec 13, 2023
  2. dummdidumm commented on Dec 13, 2023

    @dummdidumm
    Member

    Ugly in what sense? And what would make them nicer?

  3. Rich-Harris commented on Dec 13, 2023

    @Rich-Harris
    MemberAuthor

    Stuff like this:

    image

    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.

  4. dummdidumm commented on Dec 13, 2023

    @dummdidumm
    Member

    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.

  5. brunnerh commented on Sep 4, 2024

    @brunnerh
    Member

    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.

  6. modified the milestones: 2.0, 3.0 on Feb 26, 2026
  7. added a commit that references this issue on Jul 18, 2026
    aedaa27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions