I have a Nextjs app and I imported the module next-stripe (npm i next-stripe) to use the createCheckoutSession. When I run my code I get the following error:
./node_modules/next-stripe/client.js remote: Module not found: Can't resolve './dist/client'
When I look into the node_modules/next-stripe/client.js file it shows:
module.exports = require('./dist/client').default
However, there is no dist folder in the node_modules/next-stripe folder but the folder in it is called src. When I change the code in the client.js file to module.exports = require('./src/client').default in my local environment it seems to work, but I can't do that remotely on my heroku cloud server.
Not sure if I am doing anything wrong or how to fix this. Any suggestions?