Depending on origin, url can be broken

I deployed a react web app using your excellent automatic service but I notice a strange (and buggy) behavior.

In my app, I have routes /people/{id}, which work perfectly when I reach them from one location (/peoples) and display a white page with a strange javascript error when hit directly or from /fullgraph.

So this path works well :
/peoples → /people/24
but these do not :
/people/24
/fullgraph → /people/24

(or any other people id than 24).

Project is deployed at : https://encheres-albi.vercel.app

Hi @jewave, welcome to the Vercel community! Thanks for posting your issue here.

I was able to recreate the issue in my browser.

My first hunch is that all other pages are using react navigation (client-side) but the navigation from the full graph is a complete page reload. I think the configuration is not right for SPA mode, that is should rewrite all requests to the /index.html page only.

To help you further with debugging, could you share the following:

  • Which framework are you using? Vite+React or Next.js or Remix?
  • Is the issue recreating on the local setup as well?
  • Can you share the GitHub repository if it is public?

Also, could you share if you are using any sort of code splitting, lazy loading or dynamic loading for modules?