hygraph-commerce-starter icon indicating copy to clipboard operation
hygraph-commerce-starter copied to clipboard

Runtime Error on Product UI Page

Open tommyready opened this issue 2 years ago • 2 comments

Main page loads fine, I can see my product grid but when navigating to a product I get the following error:

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'id')

Any help would be great because debugging this is a nightmare. I assumed it couldn't read product.id but I ran the query in the playground and I see the ID is returned in the response.

tommyready avatar Jan 07 '22 17:01 tommyready

FYI: this error only happens on newly added products to graphCMS. The ones from the template work just fine.

tommyready avatar Jan 07 '22 18:01 tommyready

in my case its because this: Screenshot 2022-07-16 at 14 53 38

I am not sure if variant is something all the products need? could it be that there are no variants of the product? I guess then activeVariantId = product.id?

sorokinvj avatar Jul 16 '22 13:07 sorokinvj