-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Which project does this relate to?
Start
Describe the bug
Note
This one was a doozy to recreate because it only happens when the Tanstack Start app is inside of a monorepo.
I need to create the route http://localhost:3000/_hello. I have the following setup:
my-monorepo/
packages/
[...]
apps/
my-app
src/
routes/
__root.tsx
[_]hello.tsx
Where [_]hello.tsx looks like this:
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/_hello')({
server: {
handlers: {
GET: async () => {
return Response.json({ hello: 'world' })
},
},
},
})
But when I visit http://localhost:3000/_hello I get a 404 page.
When I create a fresh Tanstack Start app this problem goes away. But as soon as I place it inside of a monorepo it comes back. I only tested this with a pnpm monorepo.
Your Example Website or App
https://github.com/oztune/tanstack-start-bug
Steps to Reproduce the Bug or Issue
- Set up a monorepo (doesn't happen in a single repo). I tested this with a
pnpmmonorepo. - Create a fresh Tanstack Start project from template
- Create any route that start with an escaped underscore
[_]anything.tsx - Visit that route in the browser (
http://localhost:3000/_anything) - You always get 404
Expected behavior
I expect http://localhost:3000/_anything to serve the route
Screenshots or Videos
No response
Platform
MacOS 15.6.1
Any browser
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-router": "^1.141.8",
"@tanstack/react-router-devtools": "^1.141.8",
"@tanstack/react-router-ssr-query": "^1.141.8",
"@tanstack/react-start": "^1.141.8",
"@tanstack/router-plugin": "^1.141.8",
"@tanstack/zod-adapter": "^1.142.8",
"nitro": "latest",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"vite-tsconfig-paths": "^5.1.4",
"zod": "^4.2.1"
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels