TypeError: EventEmitter is not a constructor at new Stripe
Sananes opened this issue · 1 comments
Sananes commented
@wobsoriano First of all, thank you for this library! I'm getting the following error though and I'm not too sure why?
I have a feeling its to do with the server function not running on the server.
~/utils/create-payment-intent.ts
import Stripe from 'stripe'
const stripe = new Stripe(import.meta.env.VITE_STRIPE_SECRET_KEY, {
apiVersion: '2022-08-01',
})
export default function createPaymentIntent() {
return stripe.paymentIntents.create({
amount: 1069,
currency: 'eur',
automatic_payment_methods: { enabled: true },
})
}
Have you ran into this issue before?
Thanks in advance!
wobsoriano commented
Hey, can you try the latest release? Thanks!