nextjs-starter-medusa icon indicating copy to clipboard operation
nextjs-starter-medusa copied to clipboard

App won't build with yarn build

Open undercontr opened this issue 1 year ago • 9 comments

Hello, I cloned the repo and installed the dependencies with yarn package. But when I want to build the next app with yarn build, below error appears,

PS D:\test\nextjs-starter-medusa> yarn build
next.config.js {}
   ▲ Next.js 14.0.4
   - Environments: .env.local

 ✓ Creating an optimized production build
 ✓ Compiled successfully
   Linting and checking validity of types  ...Failed to compile.

./src/app/[countryCode]/(checkout)/checkout/page.tsx:23:44
Type error: Parameter 'cart' implicitly has an 'any' type.

  21 |   }
  22 |
> 23 |   const cart = await getCart(cartId).then((cart) => cart)
     |                                            ^
  24 |
  25 |   if (cart?.items.length) {
  26 |     const enrichedItems = await enrichLineItems(cart?.items, cart?.region_id)
PS D:\test\nextjs-starter-medusa>

Does anybody bump this kind of build issues before on a clean cloned repo?

I am using

  • Windows 11,
  • Node v20.10.0,
  • NPM 10.2.3,
  • Yarn 3.6.1

undercontr avatar Feb 26 '24 11:02 undercontr