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) #11888

Open
1 task
AdrianButler opened this issue Aug 31, 2024 · 0 comments
Open
1 task
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) pkg: svelte Related to Svelte (scope)

Comments

@AdrianButler
Copy link

Astro Info

Astro                    v4.14.5
Node                     v22.6.0
System                   Windows (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             @astrojs/sitemap
                         @astrojs/tailwind
                         @astrojs/svelte
                         @playform/compress
                         astro-compressor

If this issue only occurs in one browser, which browser is a problem?

No response

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.

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)

What's the expected result?

The component loads correctly with no errors

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-1mfzqq?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 31, 2024
@ascorbic ascorbic added pkg: svelte Related to Svelte (scope) - P3: minor bug An edge case that only affects very specific usage (priority) and removed needs triage Issue needs to be triaged labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) pkg: svelte Related to Svelte (scope)
Projects
None yet
Development

No branches or pull requests

2 participants