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?
I am getting the same error - following the instructions on the ‘Headless Shopify Developer’ course in the Shopify Academy. I am using the Hydrogen channel.
Having this same issue and found the root of the problem lies in the Meta component rendered in the root file. I can’t say whether this is a fixable bug in your meta exports or not but commenting out the component fixes the problem for me. Not too sure where to go from here
Same issue here. Also appears to be occurring “randomly” on navigation between pages. Commenting out the <Meta /> component in the root file as mentioned by @morgan seems to alleviate the issue, but since it occurs infrequently and randomly I can’t confirm that. Either way, ridding the injection of the Meta component isn’t a viable solution if you want dynamically prepared html metadata like page titles and descriptions.
@Jiffy_Geeb flip the Links and Meta components rendering order. That is, render the links above the meta tags. Fixed the problem completely for me and to my knowledge has no effect on performance or SEO. This is a known issue in the remix-run react library and this is the current solution to my knowledge. Hope this helps.