Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message when dealing with invalid markup #15502

Open
peterreeves opened this issue Mar 13, 2025 · 0 comments · May be fixed by #15524
Open

Unhelpful error message when dealing with invalid markup #15502

peterreeves opened this issue Mar 13, 2025 · 0 comments · May be fixed by #15524

Comments

@peterreeves
Copy link

Describe the bug

I've got an old v3 project that I've been upgrading to v5. I had two components, a parent component that was rendering a table, and a child component that was rendering table rows. The child also had some markup that was invalid (a child outside the <tr> element), but v3 ran with no issues. However v5 throws an unhelpful "dom is null" error. Weirdly, this only happens once I add an event handler to the markup.

This took me quite a while to find, since the error was extremely unhelpful and did not point me in the right direction. To be clear I think a better error would be nice in dev mode, in prod it's fine as is.

Reproduction

https://svelte.dev/playground/a717f2e8e91e4117940ff4bf805c8e23?version=5.23.0

Logs

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 15.93 GB / 31.91 GB
  Binaries:
    Node: 22.5.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.26100.1882

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant