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

could not proxy request /api/customers #16

Open
nwheatleKite opened this issue Sep 13, 2020 · 0 comments
Open

could not proxy request /api/customers #16

nwheatleKite opened this issue Sep 13, 2020 · 0 comments

Comments

@nwheatleKite
Copy link

nwheatleKite commented Sep 13, 2020

This was working for me a few days ago (I think?). However, today I cloned this repository, ran npm install for both server and client, and then ran the app with npm run dev.

The proxy is not working. No customers are fetched.

image

This is the terminal output:
[0] > nodemon server.js
[0]
[0] [nodemon] 1.19.1
[0] [nodemon] to restart at any time, enter rs
[0] [nodemon] watching: .
[0] [nodemon] starting node server.js
[1]
[1] > client@0.1.0 start C:\Users\nwheatley\Documents\DockerApps\fuck\react_redux_express_starter\client
[1] > react-scripts start
[1]
[1] Starting the development server...
[1]
[1] Browserslist: caniuse-lite is outdated. Please run next command npm update
[1] Compiled successfully!
[1]
[1] You can now view client in the browser.
[1]
[1] Local: http://localhost:3000/
[1] On Your Network: http://192.168.2.170:3000/
[1]
[1] Note that the development build is not optimized.
[1] To create a production build, use npm run build.
[1]
[1] Proxy error: Could not proxy request /api/customers from localhost:3000 to http://localhost:5000/.
[1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).
[1]
[1] Proxy error: Could not proxy request /sockjs-node/346/4ps1wehg/websocket from localhost:3000 to http://localhost:5000/.
[1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

I even tried adding proxy http middleware - and it still is stuck on client port 3000.

const { createProxyMiddleware } = require("http-proxy-middleware");

How can this be fixed?

OS Windows 10 Enterprise
Version 1809

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