T
TanStack•3mo ago
sunny-green

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
xenial-black
xenial-black•3mo ago
is the dev server running?
sunny-green
sunny-greenOP•3mo ago
Yes, otherwise the other files wouldn't have been generated.
xenial-black
xenial-black•3mo ago
does it have some strange permissions/ file ownership?
sunny-green
sunny-greenOP•3mo ago
Nothing that I can tell
No description
xenial-black
xenial-black•3mo ago
no error messages in the dev server logs?
sunny-green
sunny-greenOP•3mo ago
Nope, I don't see anything I can try cloning my repo to somewhere else and see if the problem is reproducible
sunny-green
sunny-greenOP•3mo ago
Weirdly enough, it is hello-world.tsx and helloworld.tsx also don't get picked up
No description
sunny-green
sunny-greenOP•3mo ago
I'll try on my Windows laptop
xenial-black
xenial-black•3mo ago
any special config for the router generator on your side?
sunny-green
sunny-greenOP•3mo 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.
xenial-black
xenial-black•3mo ago
the pattern is supposed to be a regex not a glob
sunny-green
sunny-greenOP•3mo ago
Yeah, I just realized that Thanks for the quick responses 😄

Did you find this page helpful?