T
TanStack•6mo ago
deep-jade

Can't create "/credits" route?

I started using TanStack Start about a week ago and everything has been going pretty well. I've ran into an issue where I can't create a credits page for my website because the routeTree.gen.ts generator, for some reason, ignores my credits.tsx page. Any other name for the .tsx file seems to work. It's just that credits.tsx specifically is ignored. Usually creating the file is enough for the route to be added to the routeTree file. What could be causing this? I'm using TanStack Start on Linux:
"@tanstack/react-query": "^5.81.5",
"@tanstack/react-router": "^1.122.0",
"@tanstack/react-start": "^1.122.0",
"@tanstack/react-query": "^5.81.5",
"@tanstack/react-router": "^1.122.0",
"@tanstack/react-start": "^1.122.0",
The screenshot below shows the contents of different route files I created.
No description
12 Replies
frail-apricot
frail-apricot•6mo ago
is the dev server running?
deep-jade
deep-jadeOP•6mo ago
Yes, otherwise the other files wouldn't have been generated.
frail-apricot
frail-apricot•6mo ago
does it have some strange permissions/ file ownership?
deep-jade
deep-jadeOP•6mo ago
Nothing that I can tell
No description
frail-apricot
frail-apricot•6mo ago
no error messages in the dev server logs?
deep-jade
deep-jadeOP•6mo ago
Nope, I don't see anything I can try cloning my repo to somewhere else and see if the problem is reproducible
deep-jade
deep-jadeOP•6mo ago
Weirdly enough, it is hello-world.tsx and helloworld.tsx also don't get picked up
No description
deep-jade
deep-jadeOP•6mo ago
I'll try on my Windows laptop
frail-apricot
frail-apricot•6mo ago
any special config for the router generator on your side?
deep-jade
deep-jadeOP•6mo ago
That seems to be the problem I had an ignore pattern defined:
tanstackStart({
tsr: {
routeFileIgnorePattern: ".*.d.ts",
},
}),
tanstackStart({
tsr: {
routeFileIgnorePattern: ".*.d.ts",
},
}),
This was from when I was putting CSS modules alongside the pages in the routes folder. I've since moved the CSS modules elsewhere.
frail-apricot
frail-apricot•6mo ago
the pattern is supposed to be a regex not a glob
deep-jade
deep-jadeOP•6mo ago
Yeah, I just realized that Thanks for the quick responses 😄

Did you find this page helpful?