Closed BattlefieldDuck closed 1 year ago
👋 @BattlefieldDuck thanks for reaching out and providing this feedback. We're going to take this and discuss internally whether support for platforms that don't support Node APIs directly is something we want to add to the SDK. I don't have an ETA or yes/no decision for you, but we have received your feedback!
General information
Issue description
Cloudflare Pages doesn't fully support node, so the node lib like "crypto", and "stream" doesn't work on Cloudflare Pages. The braintree-node library using the node libraries causes the Cloudflare Pages fail to build.
Cloudflare Pages Build log
There is a similar issue in the Stripe library too. https://github.com/sveltejs/kit/issues/3564 https://github.com/sveltejs/kit/issues/6547
and they solved it on this PR. https://github.com/stripe/stripe-node/pull/1679
Possible Solution
Move all platform-specific implementations into PlatformFunctions, like how stripe fixes that issue on that PR.