Issue setting up the project
Created a tsrouter app with these add ons Netlify, Sentry, Shadcn, Start, TanStack Query
Ran into this issue:
TypeError: Cannot read properties of undefined (reading 'update')
at eval routeTree.gen.ts:20:55

26 Replies
foreign-sapphireOP•7mo ago

sensitive-blue•7mo ago
Share a screenshot of the package.json which has the versions of all the packages
foreign-sapphireOP•7mo ago

fascinating-indigo•7mo ago
this sounds like a code generation issue
sensitive-blue•7mo ago
Maybe it’s the dev tools?
fascinating-indigo•7mo ago
can you share the full repository?
foreign-sapphireOP•7mo ago
i also saw this log
[vite] (ssr) Error when evaluating SSR module $vinxi/handler/ssr: Cannot read properties of undefined (reading 'update')
fascinating-indigo•7mo ago
yeah the routeTree.gen.ts tried to call update on an imported Module that is apparently undefined
so let's find out why that happens
foreign-sapphireOP•7mo ago
sensitive-blue•7mo ago
I had a similar issue last night before the dev tools patch to 1.114.1
No clue if that’s related
foreign-sapphireOP•7mo ago
I have zipped the web folder
in the meantime can i doowngrade to a version which is known to be working
fascinating-indigo•7mo ago
unlikely
sensitive-blue•7mo ago
Ah apologies for confusing the situation!
foreign-sapphireOP•7mo ago
I commented
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
and
<TanStackRouterDevtools />
in __root.tsx and it is working now
i can confirm atleast the index page is loading fine
fascinating-indigo•7mo ago
really? that's strange
need to have closer look later
not at my computer right now.
foreign-sapphireOP•7mo ago
i want to thank both of you for your quick replies
@Manuel Schiller
it is not related to dev tools i think i made tthe change after running the dev server that somehow triggered processing of the routes so that is what made it work i basically now tried uncommenting it and it still works with router dev tools as well
fascinating-indigo•7mo ago
strange
foreign-sapphireOP•7mo ago
if i stop the dev server and run pnpm dev again then i run into same issue regardless of whether dev tools is commented or not
sensitive-blue•7mo ago
ok so i recreated it by following the smae options using the create tsrouter starter. The issue is the setnry demo route
fascinating-indigo•7mo ago
how come?
sensitive-blue•7mo ago
No clue. I can make a repo and share if it's of any value. All you need to replicate is follow the options listed above and just run dev. It fails, and by loading a different component in the sentry route it works
Oh nevermind
i think updating the route tree after the dev server is runnign fixes it. I tried removing all the demo routes, and that fixed hence why i thouht it wast he setnry demo route
fascinating-indigo•7mo ago
dev server should update the route tree
sensitive-blue•7mo ago
So all i can say with confidence is that using the create tsrouter with the above options breaks ssr. Not sure why, but after the error is shown, doing any changes to any route and then saving, the error goes away and everything works while the dev server is running. Once you stop the dev server, if you try to start it again, same error.
fascinating-indigo•7mo ago
ok. can you please file an issue on the tsrouter-app repo please?
sensitive-blue•7mo ago
Sure thing
I'm gonna play with the addons for a minute first, see if it's any particular causing it and then file it
foreign-sapphireOP•7mo ago
GitHub
TypeError: Cannot read properties of undefined (reading 'update') a...
Which project does this relate to? Create Tanstack App Describe the bug I created a project using create-tsrouter-app on running npm run dev I am getting 503 Server Unavailable TypeError: Cannot re...