Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
webpack compiled successfully
Proxy error: Could not proxy request /api/user/register from localhost:3000 to http://localhost:5000/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).


I am getting this error how do i solve this problem

What I have tried:

added "secure": false in package.JSON after "proxy": "http://localhost:5000"
Posted
Updated 19-Feb-23 6:50am

1 solution

Make sure that your server is running and listening on the correct port. In this case, it should be listening on port 3000, yours seem to be running on 5000.

Check that the API endpoint /api/user/register is correct and that it exists on your server. If you're not sure, you can try accessing the endpoint directly in your browser or using a tool like Postman to test the endpoint.

Check that your server is configured to allow cross-origin requests from your React app. You can do this by adding the appropriate headers to your server's responses.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900