TanStackT
TanStack2mo ago
2 replies
verbal-lime

Failed to fetch dynamically imported module: virtual:tanstack-start-client

Hey, I've been building an app with latest tanstack start and in the beginning it was working just fine but at some point I started noticing error in browser console:
3fba7c57-b340-4b34-ad14-f9b732f6a4da.html:26  GET http://localhost:4500/@id/virtual:tanstack-start-client-entry net::ERR_ABORTED 404 (Not Found)
(anonymous) @ 3fba7c57-b340-4b34-ad14-f9b732f6a4da.html:26Understand this error
3fba7c57-b340-4b34-a…f9b732f6a4da.html:1
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:4500/@id/virtual:tanstack-start-client-entry

Initially I did not realize that it was causing a pretty serious problem as I had no interactive elements on the pages, everything was SSR rendered and static initially.
But once I started adding interactive logic to client side I noticed that nothing was actually working in the client side, the entire app would only render on server and then be completely stuck on client side.

I tried clearing vite cache, reinstalling node_modules but nothing helped.
I'm using NX monorepo but it should not matter much.

Here is my app vite config:
Was this page helpful?