I am trying to setup react routing which works when I click on something on my site the route works, however if I open a new tab and copy that url. I get
Ref
In my case, I encountered this issue because the build process did not actually build the JavaScript bundle.
The build just emitted a warning instead of an error(!), and so this issue was only found when the build was pushed to a staged deployment environment.
Hence to fix this issue I fixed the problem with the bundle not being built.