Netlify doesn't display all website pages - reactjs

I am using Netlify to deploy a website. It was built with ReactJS and locally everything works. After deploying it on Netlify only the landing page works.
The website is a simple static website for hosting my portfolio.
The main website is www.myname.com while projects are located on www.myname.com/project-name-case-study
Anything under www.myname.com/project-name-case-study leads to a "Page Not Found" screen. I'm just not sure where to even start here. I'm new to website deployment

Just figured it out. The issue was specifically related to React-Router. This freeCodeCamp article shows how to easily fix it.

As this article mentioned:
"Create a new file with the name _redirects inside the public folder of our project and add the following contents inside it:"
/* /index.html 200

Related

Netlify page not found 404 after clicking a button

I'm new to here, just have a question and want to solve it. I have deployed my app on netlify, everything works fine at localhost, but when I tested it on netlify with a function. It threw an error like this.
The page not found but when I tried reloading with that same URL, It still accessed. I use heroku for deploying api and netlify for client.
So what is the problem here? Can anyone help me, thanks!
My app for anyone would like to test: http://myblogapp123.netlify.app
create a file inside the public folder. Name it "_redirects"
inside _redirects file, paste this: /* /index.html 200
Then build your project and deploy it again. Hopefully, It'll work.

Reactjs site doesn't load any sub pages other than homepage, hosted on Netlify

I hosted one of my website on Netlify. Site was built with ReactJS.
After deploying on Netlify, I can view the homepage but can't load any of the other pages.
Site works totally fine in localhost.
Is this a problem with routing?
I used react-router for routing.
Try to create a new file in your project public folder called _redirects then add this inside it
/* /index.html 200
its been solved here before Netlify does not recognize the URL params when using react-router-dom
Just found this blog post. This gives a good explanation.
Creating a file called _redirects in the public folder and adding this code
/* /index.html 200
solves the problem.
https://dev.to/rajeshroyal/page-not-found-error-on-netlify-reactjs-react-router-solved-43oa

After Deploying the React app the page displayed is black on github pages

https://itsmenick.github.io/my-portfolio/ this is my url
I did all the changes regarding the deployment ie changes in script and all but still not reflected in this.
https://github.com/ItsMeNick/my-portfolio/ this is my github path to repository
Can anyone say what is the mistake ?
That is odd. and the development build works just fine? I noticed there is a cors error from you github page and this could be your issue.

Tags page in jekyll site working locally but not on GitHub pages, gives 404 error

Wanted to create a "tags page" that has all posts with a certain tag. I added it to the header of my website but I keep getting a 404 error. It looks like the tags page isn't building at all?
404 Error page:
https://tiffanychenster.github.io/personal-blog/tag/reviews/
Repo:
https://github.com/tiffanychenster/personal-blog
Confused as to why it works locally but not on Github pages. Thought it might be an error with my nav links but messed around with header.html a lot and got nowhere. Any help with creating the tag page on remote server would be much appreciated
GitHub Pages only allows you to run a number of whitelisted plugins, and jekyll-tagging is not one of them. This means the plugin won't run, the tag pages won't exist and you'll get a 404 response.
The suggested workaround if you want to continue using GitHub Pages and custom plugins is to build the site locally and commit the output. You could commit it to the same repo in a subfolder and then select that folder as your base in GitHub. Alternatively, you could keep the result in a separate repo (i.e. my-website and my-website-output). This way the source git history isn't tied to your output - as well as keeping each repo's file size down.
Another way altogether would be to create the tag pages without the plugin. It would be a bit more manual but not always unmaintainable depending on your use case.
Check out the ruby gem update_tags, which does what you're looking for and works in GitHub pages.
Here's some more context about how and why that gem works.

Routes don't work in production of react website

I have a question.
I created a react website and everything works perfectly on local development.
So if I go to localhost:8080/about I get on the about page.
When I build the website only an index.html gets made.
When I navigate the website from the index page, it all works, also the urls changes to /about when I go to the about page through the menu.
But when I go to www.website.com/about by typing in the address I get an error page.
Who can help me with this?
JayD
You need to setup your react router accordingly. Usually you need to add one extra file in your build files. Below is the tutorial on how to setup react router using fierbase and netlify. If you deploy somewhere else, please let me know. I can help you with that.
Firebase
Netlify

Resources