reactjs – Proxy error (React): Econnreset & Econnrefused fix?

Proxy Errors

Im getting an error:

Proxy error: Could not proxy request /api/calendar/get-events?start=2022-05-28T23:00:00.000Z&end=2022-07-09T23:00:00.000Z from localhost:3000 to localhost:5000/.
See nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

Proxy error: Could not proxy request /api/calendar/get-events?start=2022-05-28T23:00:00.000Z&end=2022-07-09T23:00:00.000Z from localhost:3000 to localhost:5000/.
See nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Have tried searching the internet for fixes to no avail so far.

{
 "name": "res-app",
 "version": "0.1.0",
 "private": true,
 "proxy": {
"/api/*":  {
  "target": "http://localhost:3000",
  "secure": false
}
},
"dependencies": {
"@fullcalendar/daygrid": "^5.11.0",
"@fullcalendar/react": "^5.11.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"moment": "2.29.3",
"react": "^18.2.0",
"react-datetime": "^3.1.1",
"react-dom": "^18.2.0",
"react-modal": "^3.15.1",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
  "react-app",
  "react-app/jest"
]
},
"browserslist": {
"production": [
  ">0.2%",
  "not dead",
  "not op_mini all"
],
"development": [
  "last 1 chrome version",
  "last 1 firefox version",
  "last 1 safari version"
]
}
}

Read more here: Source link