Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error: Property 'GiftCardProduct' is missing in type #2144

Open
HungDo-Niteco opened this issue Dec 11, 2023 · 1 comment
Open

Type error: Property 'GiftCardProduct' is missing in type #2144

HungDo-Niteco opened this issue Dec 11, 2023 · 1 comment

Comments

@HungDo-Niteco
Copy link

HungDo-Niteco commented Dec 11, 2023

Describe the Bug

I use a Magento cloud endpoint that supports giftcart products, however when I run yarn build, I receive the following problem.

image

Type error: Property 'GiftCardProduct' is missing in type '{ Skeleton: (props: SkeletonProps) => EmotionJSX.Element; SimpleProduct: typeof ProductListItem; ConfigurableProduct: typeof ProductListItem; BundleProduct: typeof ProductListItem; VirtualProduct: typeof ProductListItem; DownloadableProduct: typeof ProductListItem; GroupedProduct: typeof ProductListItem; }' but required in type 'ProductListItemRenderer'.

Expected Behavior

No issue

To Reproduce

Step 1: point magentoEndpoint to a Magento Cloud endpoint
Step 2: yarn codegen
Step 3: yarn build

image

@paales
Copy link
Member

paales commented Dec 11, 2023

In that file can you try adding the following and see if that works.

export const renderer: ProductListItemRenderer = {
  ...others...
  GiftCardProduct: ProductListItem,
}

If that works, please create a patch for now, we can then investigate how to improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants