Everything seemed to deploy but the site has a 404 error


I joined today. My site is here : https://bootstrapping-todianedev.netlify.app/

I have tried everything I have found in this forum so far including adding c = npm run in the settings and including a netlify.toml file which just caused an error in deployment so I removed it. I added information to the settings - which also caused an error so I removed that.
Right now I have no errors. The site says it has successfully deployed but all I get when I visit the page is the 404 error page and I am not sure where to go next or what to do so I appreciate any help/advice :grinning:

I had this site deployed at Heroku (Looking forward to moving here!) and it included config vars - a secret key. I am wondering if that is what is missing but I have not been able to find where to include all the config information. The only other things were PORT and IP. Are they needed?

Thanks in advance.

Hello there! Hmm, I don’t think this would have anything to do with the environment variables.

Make sure your React app builds successfully locally by running npm run build in your project directory. This will generate a build folder with your production-ready files. Does it work locally using npm run build?

Double check that your build folder contains an index.html file after running the build command locally. There’s also this (pretty old) forum post, that might be helpful.

Thanks. Little embarrassed :smirk: I shouldn’t have been using npm run build. This site is actually just a Flask site. Flask and bootstrap.
At least that explains why npm wasn’t working… it has been a long day!
Any ideas why a plain Flask site with no database and a very simple site at that might not show up?

@todianedev Taking a quick look at the Flask documentation here:

Flask seems to want to run a web server, so the issue would be explained in this thread:

You can use python during your build, but not at runtime.

1 Like