[React Router] 404 error when opening links in new tab

My site is saying page not found when I use target=_blank in the <Link>tag(react-router) but when I don’t use target=_blank it doesn’t give me the error and works fine.It also gives the error when I reload the page

React Router doesn’t generate an index.html for each path. Thus, the page at a given address doesn’t really exist on the server. It’s React that manages to render it when the link is clicked.

Look on these forms and over the internet. There are lots of people talking about this error and possible workarounds. You can search for something like React Router 404.