petherEm / stripe-client-test

testing and blogging on useShoppingCart and Stripe integration with Next.js 14
4 stars 0 forks source link

npm run build error #1

Open artemartemov opened 7 months ago

artemartemov commented 7 months ago

Hello, when trying to build out this repo locally or on vercel I seem to be getting an error for route.ts

Here is the error I am getting:

app/api/create-payment/route.ts
Type error: Route "app/api/create-payment/route.ts" does not match the required types of a Next.js Route.
  "createPaymentIntent" is not a valid Route export field.`

Was hoping you could possibly assist me in figuring this one one? I didn't notice anything from your medium post regarding this!

petherEm commented 7 months ago

Hi, thanks, my bad, I left some code from direct/embedded Stripe integration in API folder. This is not part of use-shopping-cart checkout, you can handle the checkout with no API setup with use-shopping-cart. Re error - it should be solved by adding STRIPE_SECRET_KEY.

Cheers