Comments (6)
@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
Steps to reproduce:
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
Expected behavior:
- Project builds okay out of the box -or-
- Removing the
@ts-expect-error
allows to build
Actual behavior
./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">
Work-Around / Fix
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(
from medusa.
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
from medusa.
@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?
from medusa.
same here with node 20
from medusa.
@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?
I do npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront
then npm run build
node -v
v20.15.1
npm -v
10.7.0
@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
Steps to reproduce:
This is using Node
v20.12.2
1. `npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront` 2. `cd my-medusa-storefront` 3. `npm run build`
Expected behavior:
1. Project builds okay out of the box -or- 2. Removing the `@ts-expect-error` allows to build
Actual behavior
./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">Work-Around / Fix
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(
Thanks, you should edit : Keep the two firsts: one line 30 , one line 48 **
after it work
from medusa.
same here with node 18.20.4
from medusa.
Related Issues (20)
- Scheduled jobs print an empty "error:" after every successful execution
- Routes starting with /store/customers/me are not protected by default HOT 1
- [Orders Module] Translations fix HOT 2
- After deploy, when app is not used throws relation does not exist HOT 1
- Extending cart does not work HOT 4
- Error when adding draft order using Multi-Warehouse Modules HOT 1
- Products.search fails when sales channels are turned on via public api key HOT 3
- Medusa v2 Docs: Issue in 1. Introduction - Medusa v2 Docs
- bug: No export defineRouteConfig HOT 1
- Wrong column name in migration for unique key with camelCase naming HOT 1
- Inconsistent display of product category active/inactive state between list view and edit modal
- Admin Dashboard Order List Issue HOT 3
- Tax not applied to item
- Currency ISK (Icelandic Kronur) not representing true format of the currency HOT 1
- Medusa Learning Resources: Issue in Inventory Concepts - Medusa Learning Resources HOT 1
- /auth/token/refresh returns error HOT 1
- Data Model /Service Factory error generating manyToMany relationships HOT 4
- Long-running workflows don't save correctly in workflow_execution table HOT 7
- [bug] `instanceof MedusaError` does not work
- Unable to find a BatchJob strategy with the type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medusa.