Closed vipero07 closed 3 months ago
I want to highlight, this problem doesn't occur in dev, only in prod builds.
I'm not able to reproduce this given the code snippet. Please provide a reproduction repository.
https://replit.com/@yodaissmart/500-next182-prod-issue?v=1
In the shell run npm run build && npm run preview
I should probably have noted this is while in use with conjunction with the latest version of sveltekit, and given it occurs when hydrating its probably sveltekit failing, but the failure is specific to the version of svelte. As noted, it doesn't occur in svelte@5.0.0-next.178
I've observed a very similar issue, also on a SvelteKit project; however:
DOMException: Node.appendChild: Cannot add children to a Text
next.180
and beyond, and does not manifest for next.179
Describe the bug
In production only svelte is attempting to append a child to a text node during hydration. This causes JS to hard crash and the page to fail.
This bug did not occur in svelte@5.0.0-next.178
Reproduction
The component where this occurs is a simple breadcrumb component
changing the component so the children of the each block are all on one line fixes this issue. E.G.
But it shouldn't be attempting to append a child to a text node.
Logs
System Info
Severity
annoyance