adrianhajdin / project_mern_memories

This is a code repository for the corresponding video tutorial. Using React, Node.js, Express & MongoDB you'll learn how to build a Full Stack MERN Application - from start to finish. The App is called "Memories" and it is a simple social media app that allows users to post interesting events that happened in their lives.
https://youtube.com/playlist?list=PL6QREj8te1P7VSwhrMf3D3Xt4V6_SRkhu
4.95k stars 1.83k forks source link

Can someone please help me with this error message #178

Open Raghav2709 opened 6 months ago

Raghav2709 commented 6 months ago

Screenshot (828) This happens when I try to sign up as a new person on memories website.(Authentication Problem) Error Message - index.js:20

POST http://localhost:5000/user/signup 404 (Not Found) auth.js:24 AxiosError {message: 'Request failed with status code 404', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …} code : "ERR_BAD_REQUEST" config : {transitional: {…}, adapter: Array(2), transformRequest: Array(1), transformResponse: Array(1), timeout: 0, …} message : "Request failed with status code 404" name : "AxiosError" request : XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …} response : {data: '<!DOCTYPE html>\n\n\n<meta char…e>Cannot POST /user/signup\n\n\n', status: 404, statusText: 'Not Found', headers: AxiosHeaders, config: {…}, …} stack : "AxiosError: Request failed with status code 404\n at settle (http://localhost:3000/main.163b7d63dc2807d8e50b.hot-update.js:1572:12)\n at XMLHttpRequest.onloadend (http://localhost:3000/main.163b7d63dc2807d8e50b.hot-update.js:266:66)" [[Prototype]] : Error

swarnim-dev commented 6 months ago

Can you please share the corresponding code of server-side that's handling the post request. I'd also like to add that '404' indicates 'non found', this may indicate that an endpoint is not correctly configured to /user/signup

JyothsnaVellampalli commented 4 months ago

@Raghav2709 check if you are running server on port 5000.

shristiss commented 4 months ago

hey, any updates? I am also stuck on this issue!

Saibaba161 commented 1 month ago

I too am stuck here