could not proxy request /api/customers
nwheatleKite opened this issue · 0 comments
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.
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