node-react-ecommerce icon indicating copy to clipboard operation
node-react-ecommerce copied to clipboard

Proxy error: could not proxy request /api/products

Open blasius18 opened this issue 5 years ago • 6 comments

During Lesson 15, Signin and Resgister screens:

Error on Terminal: Proxy error: Could not proxy request /api/products from localhost:3000 to http:.

Error on Console: Failed to load resource, the server responded with a error of :3000/api/products

Error on Web page: Request failed with status code 404

I tried restarting the terminal and reinstalling the packages but still the same. my code on github is at: [https://github.com/blasius18/thefrockboutique]

Please help!!

blasius18 avatar Jun 12 '20 10:06 blasius18

You need to open the vs code and run it on your computer. then send me a message over Skype to set a 15 mins call for you to fix your issue. My Skype name is basir.jafarzadeh

basir avatar Jun 12 '20 20:06 basir

Check this:

  1. frontend/package.json
{
  "name": "frontend",
  "proxy": "http://127.0.0.1:5000",
...
}
  1. stop running frontend and backend
  2. Run backend first
npm start
  1. Then frontend
cd frontend
npm start

basir avatar Jun 13 '20 08:06 basir

That worked, thank you so much, sir :):)

blasius18 avatar Jun 15 '20 07:06 blasius18

happy to hear that.

basir avatar Jun 16 '20 07:06 basir

sir i have also same problem, Error on Terminal: Proxy error: Could not proxy request /api/products from localhost:3000 to http:.

Error on Console: Failed to load resource, the server responded with a error of :3000/api/products

Error on Web page: Request failed with status code 404

I tried restarting the terminal and reinstalling the packages but still the same.

but cant got solution till now

shaikh-akbar avatar Mar 16 '23 11:03 shaikh-akbar

sir please resolve the same error in my project

pratyaksha101 avatar Feb 24 '24 14:02 pratyaksha101