404 Page not found. No access to some pages on my site

Hi everyone, I’m Francis and a newbie.

I have a 404 page though the deployment is published. This was not initially there when I deplyoed my app 2 months ago. I only stumbled on it now because I was checking my apps functionalities.
1

I checked my /index.html and I can see it when I download my published deploy.

I also just created a netlify.toml file in an attempt to resolve the issue with this command code

[build]
command = “npm run build”
publish = “/build”
base = “/”

[[redirects]]
from = “/*”
to = “/index.html”
status = 200

I created my app with React, deploed it and all was working. Now I can access the app but not all the pages on the app

Here is my app https://movie-app-client.netlify.app/

Please could you help me?
Thanks in advance!

Hi @FrancisJunior,

When I checked https://movie-app-client.netlify.app/, it appears that the site is loading fine. Is there some other page that’s not loading specifically?

Hello @hrishikesh,

yes…if you try to access the Sign-up page, you get the 404 error.

Also, when I login and try to access the user profile page, I get the same 404 error.

I can provide you a user info to login and check if that will be necessary for you.

Thanks

Hey there, @FrancisJunior :wave:

Thank you for following up! If you would like Support to debug this further, please create login credits that we can use to test this.

Hello @hillary,

Please use this info to login

Username: Newuser
Password: newuser

As earlier explained, the sign-up page and the profile page (Newuser) after signing in display the 404 error message.

Thanks

Hello please can i get help? i have been trying to deploy my react.js app but keep on saying error 404 “page not found”. i have followed all steps and made some research but still the same thing. please any help? which information can i share to get feed back?

To start with, your site name or ID can help :slight_smile:

Hello, I still face the same 404 page not found issue. Did i do something wrong in my build up to deploy with netlify?

Hey @FrancisJunior

The configuration you displayed in the original post appears correct, however yes, I see a 404 returned on refresh (normal navigation does appear to work correctly) which suggests there is an issue with this.

Are you able to share the repository you are deploying from?

Hi @coelmay

here is the repository GitHub - Junior-22/movie-app-client

Thanks

Thanks @FrancisJunior

The netlify.toml is in the wrong place. It needs to reside in the root of the repository not, in the src directory.

Hi @coelmay

it has been moved.

As stated in my initial post, I only created the netlify.toml after I discovered the issue and was trying to get it solved. Before I had the file, I had successfully deployed my app and all pages were functional.

Thanks

Hi @FrancisJunior

I see that you’ve moved the netlify.toml file to the root directory. We believe that since the .toml file is now in the right place, you should be able to build if you remove
&& cp _redirects dist from the build command. Could you give that a shot and let us know how it goes?

1 Like

Hi @elden

still no success with this approach. Still have the ‘Page not found’ error message :cry:

I have checked my build settings to make sure all is ok. Now I am really confused as to why the problem keeps occuring.

Hi @FrancisJunior,

Your latest attempts to build have all failed:

It also mentions the problem:

build doesn’t exist, but your files are being written to dist: Netlify App

I believe you need to change that option here: https://github.com/Junior-22/movie-app-client/blob/main/netlify.toml#L3

Regarding the 404, the current published deploy doesn’t have any redirects, thus the issue.

Hi @hrishikesh,

this is what worked out…I removed the .toml file which was not initially in my project and changed my nav element tags from “Nav.Link” to “Link” and everything worked out