search

Home  >  Q&A  >  body text

next.js v13 returns unexpected tag 'export'; firestore-stripe - payment error

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粉741223880P粉741223880267 days ago362

reply all(1)I'll reply

  • P粉613735289

    P粉6137352892024-02-22 13:33:47

    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"]

    reply
    0
  • Cancelreply