'How can i solve this error? ./node_modules/stripe/lib/utils.js Module not found: Can't resolve 'child_process' in

I'm using Nextjs and I'm trying to use stripe for a subscription. The button bellow is fetching a api but i get the error bellow. I tried using /api/spripe.js instead of /test/stripe.js but is even worse (i don't even hit the api. I get 404)

Browser test/stripe.js index.js

Dependencies: "dependencies": { "next": "12.1.6", "react": "18.1.0", "react-dom": "18.1.0", "stripe": "^8.220.0" },

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source