-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Bundling with Stripe and other packages leads to unclear error hint #853
Comments
Hi @rishsriv - are you running the webpack bundling via a custom build in Wrangler2? Apart from defining the STRIPE_API_KEY from the environment, I think that the Wrangler 2 built in bundling should just work with this, meaning that you could drop the webpack custom build step. Not sure the best approach to actually provide that API key at build time though... |
The problem here is that stripe uses some node libs, which we don't currently polyfill. We want to do this very badly, but couldn't fit it into v2, but will definitely do so in 2.1 (tracking here #101) The workaround is to do a custom build like you're currently doing, so I don't know webpack well enough to understand why your polyfill isn't working/applying itself. |
Got it, thank you @petebacondarwin and @threepointone! Appreciate the responses. Will just wait for 2.1 then, I have offloaded Stripe authentication as a microservice in a VM for now. Thanks again for the awesome work on this – working with wrangler2 has been a way better experience than wrangler. Better error hints ftw! |
We published 0.0.28 that introduces a new experimental |
Closing this because I tried bundling a worker with stripe and it "worked". Happy to chat more if anything else comes up! |
What version of
Wrangler
are you using?0.0.27
What operating system are you using?
Mac
Describe the Bug
I'm attempting to upload a bundle with the Stripe npm package and Durable Objects. But when attempting to upload, am getting error messages like these:
However, these do not specify where the platform: 'node' should be used (I have tried at various locations in
wrangler.toml
,webpack.config.js
, andpackage.json
, but nothing has worked so far)The webpack config is below
Any help would be very much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: