#_index.tsx seems to be excluded

1 messages ยท Page 1 of 1 (latest)

grizzled sand
#

Hello, in my codebase it seems like that the routes/_index.tsx won't match. I'm on the route naming convention v2 and according to my understanding this should render my Index route. But it only renders what's in the root.tsx is defined. Anybody has an idea or experienced a similar behaviour? I just bumped the remix version to v1.18.0 ๐Ÿ™‚

royal shore
#

v2_routingConvention: true in remix.config?

grizzled sand
#

yes ๐Ÿ™‚ I changed already all other routes to the new convention and everything works as expected except this route

royal shore
#

Weird... Run npx remix routes and see what's up?

grizzled sand
royal shore
#

Mhm

#

Should look like this:
<Routes>
<Route file="root.tsx">
<Route index file="routes/_index.tsx" />
</Route>
</Routes>
Can you run npm ls @remix-run/router or yarn why @remix-run/router and see what version shows up?

#

Should be 1.7

#

This shouldn't happen anymore, but there was a fastglob problem that existed a few versions back. We cleared it by restarting the server, and possibly deleting .cache, build, dist folders.

royal shore
grizzled sand
#

okay headsup. npm ls @remix-run/router wasn't outputting anything. I checked the node_modules and the router folder was empty. I installed it separately (v1.7) but still no success

grizzled sand
grizzled sand
#

Alright! I got it. We somehow had a regex in the ignoredRouteFiles which filtered out everything with a _ prefix. Really appreachate your help and the npx remix routes command is super helpful! ๐Ÿ™‚