-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
append_styles(...) --> Cannot read properties of null (reading 'querySelector') #14972
Comments
Are you using or rendering in a webcomponent? |
No, it's a pretty default SvelteKit project. No webcomponents involved. |
Then we really need a reproduction for this. |
Ok, it seems that this was the result of some direct DOM manipulation ('appendChild' without a 'removeChild' on component destruction),... |
I'm getting this error too. i'm trying to understand to be able to reproduce but I cannot understand why it happens! If I comment some part of the code it disappears but in that part of the code there is simple html only. I'm on If I find out how to reproduce I'll write here. THIS IS HUGE I THINK! Can you please update the priority on this, please? |
Describe the bug
I get some random
Cannot read properties of null (reading 'querySelector')
pointing to the functionapend_styles(anchor, css)
incss.js
.Reproduction
I am afraid I did not manage to reproduce this outside my app, and the part it occurs in is something rather special (recursive and dynamic components). But it seems to occur if the
svelte:component
changes to another component.Logs
System Info
System: OS: Linux 6.12 Void CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor Memory: 47.80 GB / 62.73 GB Container: Yes Shell: 5.9 - /bin/zsh Binaries: Node: 20.16.0 - /usr/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 10.8.1 - /usr/bin/npm pnpm: 9.14.2 - /usr/bin/pnpm Browsers: Brave Browser: 121.1.62.153 Chromium: 131.0.6778.85 npmPackages: svelte: ^5.10.1 => 5.17.1
Severity
Prevents upgrade to Svelte 5
The text was updated successfully, but these errors were encountered: