commerce
commerce copied to clipboard
Failed to compile when run yarn next build
Failed to compile.
./framework/ordercloud/utils/product.ts:16:5 Type error: Type '{ id: string; options: { id: string; __typename: "MultipleChoiceOption"; displayName: string; values: { label: string; }[]; }[]; }[]' is not assignable to type 'ProductVariant[]'. Property 'price' is missing in type '{ id: string; options: { id: string; __typename: "MultipleChoiceOption"; displayName: string; values: { label: string; }[]; }[]; }' but required in type 'ProductVariant'.
14 | currencyCode: product.xp.PriceCurrency, 15 | },
16 | variants: product.xp.Variants?.length | ^ 17 | ? product.xp.Variants.map((variant) => ({ 18 | id: variant.ID, 19 | options: variant.Specs.map((spec) => ({ error Command failed with exit code 1.