As the title indicates, I have a next.js(13.2.0) project and I have installed firestore-stripe-payments package. But when I import { getStripePayments } from "@stripe/firestore-stripe-payments"; I receive SyntaxError: Unexpected token ‘export’. I am very new to react and next.js but from what I am understanding that issue was solved with next.js v13, why am I getting that error? Below is the log screen
2
Answers
I found the solution for anyone who struggles with the same problem. In next.config.js put that line of code in module.exports: transpilePackages: ["name-of-the-package"]
@chris_ provided the correct answer, but for those who didn’t follow, here’s what your code should look like.
In the next.config.js file: