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

I get this 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.

I didn’t change much code in the Remix Hydrogen repo when I generated the --quickstart version.

This error started when I changed the values in the .env file manully and moved from the Mock.shop to data from the Headless Sales Channel integration.

It happens when the Remix Hydrogen React app starts. I go to the list of collections. And then click one of the collections in the list. Instead of seeing the products in the collection, I get this error. The error goes away when I refresh the page.

Again, I haven’t changed any in the collection code since it’s all from the --quickstart and Mock.shop data.

What could possibly be happening? Is it a data issue?

I’m unable to reproduce the problem. Could you give a few more specifics? What version of Node are you using? What OS? Could you share the exact command you used to setup the project and then to start up the app?

Node v21.7.3
Remix-Hydrogen v2024.10.0
Chrome v130.0.6723.117
MacOS v12 Monterey

I would upload a screen captured video but I don’t have that option on this site.

Why are you using the headless channel? Could you please try the hydrogen channel instead?