You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language, language version, and OS: Node.js: 18.17.1 on Node.js: 18.17.1
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
03:47:45.783 | node_modules/braintree/lib/braintree/digest.js:3:21: ERROR: Could not resolve "crypto"
03:47:45.783 | node_modules/braintree/lib/braintree/document_upload_gateway.js:6:23: ERROR: Could not resolve "stream"
03:47:45.784 | node_modules/braintree/lib/braintree/http.js:4:19: ERROR: Could not resolve "http"
03:47:45.784 | node_modules/braintree/lib/braintree/http.js:5:20: ERROR: Could not resolve "https"
03:47:45.784 | node_modules/braintree/lib/braintree/http.js:6:19: ERROR: Could not resolve "zlib"
👋 @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.
sveltejs/kit#3564
sveltejs/kit#6547
and they solved it on this PR.
stripe/stripe-node#1679
Possible Solution
Move all platform-specific implementations into PlatformFunctions, like how stripe fixes that issue on that PR.
The text was updated successfully, but these errors were encountered: