After npm install, run the development server:
npm run dev
This all works as expected.
Run the build
npm run build
You can preview the production build with npm run preview.
When running the build directory from any non-vite host, navigate to http://localhost:4173/user/Bobby directly in the browser, it will 404
Note: If you navigate to the root page first, then click the link to /user/Bobby, it works fine. The issue is only when directly linking to that page.