commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Failed to compile when run yarn next build

Open geniti opened this issue 3 years ago • 0 comments

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.

geniti avatar Mar 31 '22 15:03 geniti