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

TypeError: Cannot read properties of null (reading 'nodeType') (Astro + Svelte 5) #13088

Open
AdrianButler opened this issue Aug 31, 2024 · 1 comment
Labels
awaiting submitter needs a reproduction, or clarification

Comments

@AdrianButler
Copy link

Describe the bug

I am getting this error and my svelte component will not load at all. It works perfectly fine in dev environment but when I build or run preview it stops working and the error is thrown in the console.

Reproduction

https://gist.github.com/AdrianButler/4b04009c797bf37599c6763d09111a0b

This component is being used in a astro file with the client directive of load

This only happens in production build and the component works perfectly fine in dev environment

Logs

faq/:1 [astro-island] Error hydrating /_astro/FaqQuestion.B9nkJrIu.js TypeError: Cannot read properties of null (reading 'nodeType')
    at Ut (template.BZob6Wd_.js:1:8993)
    at G (FaqQuestion.B9nkJrIu.js:1:1234)
    at render.Eek01tEQ.js:1:1270
    at Sn (template.BZob6Wd_.js:1:5360)
    at U (template.BZob6Wd_.js:1:6097)
    at k (template.BZob6Wd_.js:1:2186)
    at bt (template.BZob6Wd_.js:1:2805)
    at render.Eek01tEQ.js:1:1212
    at Sn (template.BZob6Wd_.js:1:5360)
    at U (template.BZob6Wd_.js:1:6097)

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K
    Memory: 17.34 GB / 31.77 GB
  Binaries:
    Node: 22.6.0 - ~\AppData\Roaming\JetBrains\WebStorm2024.2\node\versions\22.6.0\node.EXE
    npm: 10.8.2 - ~\AppData\Roaming\JetBrains\WebStorm2024.2\node\versions\22.6.0\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Severity

blocking all usage of svelte

@dominikg
Copy link
Member

this reads similar to #12601

please try updating to vite-plugin-svelte@^4.0.0-next.6. (requires using an override in your package.json)

if it does not fix the issue, we require a repo link with a reproduction, to be able to investigate.

@dummdidumm dummdidumm added the awaiting submitter needs a reproduction, or clarification label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter needs a reproduction, or clarification
Projects
None yet
Development

No branches or pull requests

3 participants