Skip to content
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

Error occurred while trying to proxy request / from localhost:8080 to http://localhost:8787 (ECONNREFUSED) #224

Open
michaelrkn opened this issue Mar 8, 2022 · 2 comments

Comments

@michaelrkn
Copy link

Hello! I'm following the Quickstart. When I run yarn dev and visit http://localhost:8080, the browser displays "Error occured while trying to proxy to: localhost:8080/" and the terminal displays:

[client] [HPM] Error occurred while trying to proxy request / from localhost:8080 to http://localhost:8787 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[client] [HPM] Error occurred while trying to proxy request /favicon.ico from localhost:8080 to http://localhost:8787 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[worker] ⚠ 「copy-webpack-plugin」: unable to locate '/Users/michael/register/public' at '/Users/michael/register/public'
[worker] 🌀  Using namespace for Workers Site "__register-workers_sites_assets_preview"
[worker] ✨  Success
[worker] 👂  Listening on http://127.0.0.1:8787
[worker] 🌀  Detected changes...
[worker] 💁  Ignoring stale first change

If I visit http://localhost:8787/, the browser displays "You're running React on the Edge!"

I don't see anything about port 8787 in the docs and am not sure about the implications of using that port instead of 8080.

I'm using:

  • Node v17.6.0
  • Yarn 1.22.15
  • Flareact 1.5.0
@tj-kev
Copy link
Contributor

tj-kev commented Mar 13, 2022

Hi, were you able to get this working in the end?

I've tested on Node v17 and received a different error show below:

[client] node:internal/crypto/hash:67
[client]   this[kHandle] = new _Hash(algorithm, xofLen);
[client]                   ^
[client]
[client] Error: error:0308010C:digital envelope routines::unsupported
...

I fixed this by setting an env variable:

export NODE_OPTIONS=--openssl-legacy-provider

Once passed this node v17 worked as expected when accessing on http://localhost:8080:

🚀 Starting Flareact dev server on http://localhost:8080 ...

[worker] 🌀  Using namespace for Workers Site "__my-app-worker-function-workers_sites_assets_preview"
[worker] ✨  Success
[worker] 👂  Listening on http://127.0.0.1:8787
[worker] 🌀  Detected changes...
[worker] 💁  Ignoring stale first change
[worker] [2022-03-13 18:55:09] GET my-app-worker-function.my-account.workers.dev/ HTTP/1.1 200 OK

@ArniDagur
Copy link

For me it worked to downgrade to Node 16.

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

3 participants