next.js v13 returns unexpected tag 'export'; firestore-stripe - payment error
P粉741223880
P粉741223880 2024-02-21 16:20:56
0
1
375

As the title says, I have a next.js(13.2.0) project, and I have installed the firestore-stripe-payment package. But when I import { getStripePayments } from "@stripe/firestore-stripe-payments"; I get SyntaxError: Unexpected token 'export'. I'm new to React and next.js but from what I understand the issue is resolved with next.js v13, why am I getting this error? Below is the log screen

P粉741223880
P粉741223880

reply all(1)
P粉613735289

I found a solution for those who have the same problem. In next.config.js put this line of code in module.exports: transpilePackages: ["name-of-the-package"]

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template