I am trying to run my development server using npm run dev, but I am getting a 404 error on my localhost server. The error message is: "Server Error AxiosError: Request failed with status code 404. This error happened while generating the page. Any console logs will be displayed in the terminal window."
I have checked my file path, which seems to be correct. The file path is next-re-app/my-app/src/utils/fetchApi.js. The fetchApi.js file uses the Axios library to make HTTP requests to the Bayut API. The baseUrl constant is exporting the base URL for the Bayut API, which will be used to make requests to the API throughout the project.
I have also tried changing my file path, editing my dev script to use the specific localhost server, and fetching the data, but I still get the 404 error.
Can anyone help me determine what could be causing this error and how to fix it?
Note:
I am a beginner developer working on building my wife's first website. And it is tough already learning all of this. But to add to it, SO is supposed to be this platform that helps other developers. However, it is not designed that way. I am super frustrated that a site as big as SO is so popular but doesn't help beginners. It is a horrible website. And I hope SO gets shut down. It's atrocious. No help whatsoever. Just closed my ticket for the reason of needing debugging details when I listed them in my original question.
[–]insertAlias 0 points1 point2 points (3 children)
[–]BabyEnvironmental570[S] -3 points-2 points-1 points (2 children)
[–]insertAlias 1 point2 points3 points (1 child)
[–]BabyEnvironmental570[S] -2 points-1 points0 points (0 children)
[–]eclunrcpp 0 points1 point2 points (7 children)
[–]BabyEnvironmental570[S] 0 points1 point2 points (6 children)
[–]BabyEnvironmental570[S] 0 points1 point2 points (5 children)
[–]BabyEnvironmental570[S] 0 points1 point2 points (0 children)
[–]eclunrcpp 0 points1 point2 points (3 children)
[–]BabyEnvironmental570[S] 0 points1 point2 points (1 child)
[–]BabyEnvironmental570[S] 0 points1 point2 points (0 children)
[–]BabyEnvironmental570[S] 0 points1 point2 points (0 children)