Skip to content

Error in solid-meta when navigating solid-start app: The node to be removed is not a child of this node #38

Description

@knpwrs

https://lets.church is a solid-start app (source code here: https://github.com/LetsChurch/lets.church). When I upgraded from @solidjs/meta@0.28.6 to @solidjs/meta@0.29.1 I started seeing a bug where when I would navigate to a particular route (/media/[id]) and then navigate to another instance of that route, the app would crash:

Screen Recording 2023-11-14 at 9 19 27 PM

This is the line that is crashing:

el.parentNode.removeChild(el);

And this is the error: DOMException: Node.removeChild: The node to be removed is not a child of this node.

This is the <Title> element in my media/[id].tsx route file, as well as my <Og /> component which renders a number of <Meta /> tags:

https://github.com/LetsChurch/lets.church/blob/adf8502d3fa73519b7279c4336b2910cc44eedb7/apps/web/src/routes/(root)/media/%5Bid%5D.tsx#L465-L477

I have no real idea what's going on here, but I do know that this behavior is happening with:

  • @solidjs/meta@0.29.1
  • solid-js@1.8.5
  • solid-start@0.3.9

This is not happening with:

  • @solidjs/meta@0.28.6
  • solid-js@1.7.11
  • solid-start@0.3.5

This also only reproduces in production builds and not in development mode.

This commit acts as a temporary fix by downgrading @solidjs/meta, solid-js, and solid-start (this is the currently deployed commit): LetsChurch/lets.church@af443f3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions