My app returning 404 errors

Hi. The landing page works fine and making backend requests on there works. However when I route to /stays or any other route that does backend query, I get a 404 not found page

My web service region is Ohio and it’s a new account. Front end is Reactjs and backend is Nodejs

For starters, I’m seeing this in the logs:
Error: ENOENT: no such file or directory, stat ‘/opt/render/project/src/client/build/index.html’

This is how my static use looks like and I think the error is coming from here:

app.get(“*”, (req, res) => {

res.sendFile(path.resolve(__dirname, “client”, “build”, “index.html”))


Also I have attached a photo of my folder structure


If you’re referring to 404s on the frontend, maybe you haven’t implemented the rewrite for the React Router?



1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.