-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Regression introduced in PR #5870 #6567
Comments
I think this might be a component resolution issue when a component is loaded dynamically. I'm getting this error in dev (but not build) after upgrading to Svelte 3.40.2 in the svelte/kit project
In my project NavBar component is the first component loaded by __layout.svelte. If I remove the NavBar import, I get the error on Downgrade to 3.39 and everything works. Someone else has logged a similar issue to mine with in the Vite project, which is most likely the same thing. I think this is only happening when components are loaded dynamically, as the example above, my example and the vite issue example all happen with dynamically loaded components |
@antstanley : thats a different issue, see sveltejs/kit#2001 |
Thank you for finding and posting this. I've got the same error in my project this morning and this post saved me a few hours of digging into the svelte source code. |
Mounting a component at a detached DOM node should be working again in 3.40.3 - https://svelte.dev/repl/2106c33509344d6784617400c312893d?version=3.40.3 |
Describe the bug
Initializing a component into an unmounted div throws
Reproduction
https://svelte.dev/repl/2106c33509344d6784617400c312893d?version=3.40.2
Click on "Hello World" h1.
works in v3.39
The offending lines are
in svelte/internal/index.mjs (introduced in #5870)
get_root_for_styles does not return document for a detached node
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: