T
TanStack7mo ago
foreign-sapphire

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
No description
26 Replies
foreign-sapphire
foreign-sapphireOP7mo ago
No description
sensitive-blue
sensitive-blue7mo ago
Share a screenshot of the package.json which has the versions of all the packages
foreign-sapphire
foreign-sapphireOP7mo ago
No description
fascinating-indigo
fascinating-indigo7mo ago
this sounds like a code generation issue
sensitive-blue
sensitive-blue7mo ago
Maybe it’s the dev tools?
fascinating-indigo
fascinating-indigo7mo ago
can you share the full repository?
foreign-sapphire
foreign-sapphireOP7mo 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
fascinating-indigo7mo 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-sapphire
foreign-sapphireOP7mo ago
sensitive-blue
sensitive-blue7mo ago
I had a similar issue last night before the dev tools patch to 1.114.1 No clue if that’s related
foreign-sapphire
foreign-sapphireOP7mo ago
I have zipped the web folder in the meantime can i doowngrade to a version which is known to be working
fascinating-indigo
fascinating-indigo7mo ago
unlikely
sensitive-blue
sensitive-blue7mo ago
Ah apologies for confusing the situation!
foreign-sapphire
foreign-sapphireOP7mo 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
fascinating-indigo7mo ago
really? that's strange need to have closer look later not at my computer right now.
foreign-sapphire
foreign-sapphireOP7mo 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
fascinating-indigo7mo ago
strange
foreign-sapphire
foreign-sapphireOP7mo 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
sensitive-blue7mo 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
fascinating-indigo7mo ago
how come?
sensitive-blue
sensitive-blue7mo 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
fascinating-indigo7mo ago
dev server should update the route tree
sensitive-blue
sensitive-blue7mo 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
fascinating-indigo7mo ago
ok. can you please file an issue on the tsrouter-app repo please?
sensitive-blue
sensitive-blue7mo 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-sapphire
foreign-sapphireOP7mo 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...

Did you find this page helpful?