basir / node-react-ecommerce

Build ECommerce Website Like Amazon By React & Node & MongoDB
https://node-react-ecommerce-app.herokuapp.com/
1.69k stars 794 forks source link

Proxy error: could not proxy request /api/products #45

Open blasius18 opened 4 years ago

blasius18 commented 4 years ago

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!!

basir commented 4 years ago

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 commented 4 years ago

Check this:

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

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

basir commented 4 years ago

happy to hear that.

shaikh-akbar commented 1 year ago

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

pratyaksha101 commented 9 months ago

sir please resolve the same error in my project