Home > javascript > React – Proxy error: Could not proxy request

React – Proxy error: Could not proxy request

Problem:
I was getting the following error
“Proxy error: Could not proxy request See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).”

Solution:
Change in package.json

"proxy": "http://localhost:5000"

To

"proxy": "http://127.0.0.1:5000"

No idea why this works. When I do a curl on localhost:5000 I get back a response. SMH. This was working previously with node version 16, but not anymore with node version 18.

Source:
https://stackoverflow.com/questions/45367298/could-not-proxy-request-pusher-auth-from-localhost3000-to-http-localhost500

Categories: javascript Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.