Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.4k stars 268 forks source link

Error: failed to execute 'insertBefore' on 'Node' #2586

Open scottdixon opened 2 weeks ago

scottdixon commented 2 weeks ago

What is the location of your example repository?

https://github.com/scottdixon/hydrogen-meta-exports-bug

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.7.8

What version of Remix are you using?

2.10.1

Steps to Reproduce

The storefront will throw a 500 error:

Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

Findings so far:

Expected Behavior

Meta exports should work.

Actual Behavior

The storefront throws a 500:

Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

wizardlyhel commented 1 week ago

Not a meta export issue - https://github.com/remix-run/remix/issues/9242

This is very likely an issue that only appears in dev

juanpprieto commented 4 days ago

As a temporary workaround, I believe upgrading to React 19 seems to solve this issue.