Skip to content

Cannot get proxy working locally. #27

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

Closed
joshuaiz opened this issue Jun 10, 2019 · 1 comment
Closed

Cannot get proxy working locally. #27

joshuaiz opened this issue Jun 10, 2019 · 1 comment

Comments

@joshuaiz
Copy link

Hello,

Trying to use this to run Stripe Elements with a local React site but can't get the proxy to work.

Was following this example but updated as per the code examples in this repo to use yarn: https://mitchgavan.com/react-serverless-shop/

Getting this error:
[HPM] Error occurred while trying to proxy request /charge from localhost:3000 to https://localhost:9000 (EPROTO) (https://nodejs.org/api/errors.html#errors_common_system_errors)

There's nothing else on port 9000. I've tried restarting both the app and lambda server and still cannot connect.

It's similar to this: #19

However none of the solutions there worked.

When I hit Submit on my Stripe checkout form, the proxy fails and I cannot complete any transactions (running with test API keys). Is there anything specific to look for to see why the proxy is failing?

@joshuaiz
Copy link
Author

Looks like some of the code I was following from this example was out of date:
https://mitchgavan.com/react-serverless-shop/

Updated my code with more recent examples from netlify-lambda and Stripe and it is working. I can't say exactly what did it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant