Open AwaaX opened 1 month ago
@AwaaX I can build the project without issues. Can you please provide more information to reproduce the issue from a clean clone? What command did you run? Are you running main
? What is your node/yarn version?
What are you trying to run, the starter project?
@sradevski I am also facing this issue with a completely clean (out of the box) install.
I have created a clean install that replicates the issue here: matmar10/medusa-storefront
This is using Node v20.12.2
npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront
cd my-medusa-storefront
npm run build
@ts-expect-error
allows to build./src/modules/products/components/product-tabs/accordion.tsx:57:8
Type error: Unused '@ts-expect-error' directive.
55 | )}
56 | >
> 57 | {/* @ts-expect-error */}
| ^
58 | <AccordionPrimitive.Header className="px-1">
59 | <div className="flex flex-col">
60 | <div className="flex w-full items-center justify-between">
You can resolve the issue by leaving the first @ts-expect-error
and removing the remaining ones:
diff --git a/src/modules/products/components/product-tabs/accordion.tsx b/src/modules/products/components/product-tabs/accordion.tsx
index db8855a..03d837a 100644
--- a/src/modules/products/components/product-tabs/accordion.tsx
+++ b/src/modules/products/components/product-tabs/accordion.tsx
@@ -54,14 +54,12 @@ const Item: React.FC<AccordionItemProps> = ({
className
)}
>
- {/* @ts-expect-error */}
<AccordionPrimitive.Header className="px-1">
<div className="flex flex-col">
<div className="flex w-full items-center justify-between">
<div className="flex items-center gap-4">
<Text className="text-ui-fg-subtle text-sm">{title}</Text>
</div>
- {/* @ts-expect-error */}
<AccordionPrimitive.Trigger>
{customTrigger || <MorphingTrigger />}
</AccordionPrimitive.Trigger>
@@ -73,7 +71,6 @@ const Item: React.FC<AccordionItemProps> = ({
)}
</div>
</AccordionPrimitive.Header>
- {/* @ts-expect-error */}
<AccordionPrimitive.Content
forceMount={forceMountContent}
className={clx(
I had this error as well with npm, I tried the fix above but got a different error - tried adding @medusajs/types but no luck.
I deleted my .node-modules and then used yarn, yarn dev, and yarn build - it ran successfully and built the next app
same here with node 20
Preliminary Checks
Issue Summary
I get type error "Type error: Unused '@ts-expect-error' directive." when trying to run build so i can't use storefront in production mode
How can this issue be resolved?
No idea
Are you interested in working on this issue? Sorry I'm not a developer I am a e-commerce company holder testing medusa