Stripe with Remix 2.0
I'm using Stripe with Remix on CF Pages, using this configuration:
`
I've tried many ways but I always get this error:
Is this related with ESM config in Remix 2.0. ? I thught Stripe was totally compatible with Workers...
7 Replies
Hey 🙂
I was struggling with the same issue. I am still confused why Stripe actually does not work with wrangler 3.x and Remix 2.x.
Try adding this to the
remix.config.mjs
At least you get rid of the error. However, I have not yet conducted an end-to-end test verifying this actually works. If you try it, let me know! I am curiousThey might need to update it to make it work with Remix 2.0, because it's supposed to work with Workers.
https://blog.cloudflare.com/announcing-stripe-support-in-workers/
The Cloudflare Blog
Announcing native support for Stripe’s JavaScript SDK in Cloudflare...
Handling payments inside your apps is crucial to building a business online. For many developers, the leading choice for handling payments is Stripe.
Yes, there is also bunch of other compativility isssues. To list some:
- util
- crypto
- buffer
When bumping from Wrangler 2.x to 3.x and from Remix 1.9 to 2.x, bunch of libraries that used to work are now throwing errors related to
nodejs_compat
. I can't just yet really pinpoint down what went wrong, but something is off for sure 🤔Should we open a issue on Stripe github to track down all these bugs?
@snapo thank you
its work for me
I am pretty sure this is not Stripe related but more some remix - cloudflare internals. My sophisticated guess would be cloudflare or just wrangler
GitHub
Stripping of "node:" prefix on node imports like 'node:util' breaks...
What version of Remix are you using? 1.14.3 Are all your remix dependencies & dev-dependencies using the same version? Yes Steps to Reproduce Have import * as Util from 'node:util'; con...