-
-
Notifications
You must be signed in to change notification settings - Fork 974
Cannot read properties of undefined (reading 'getStreamedValue') #4244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Searching deep on the base code. I noted that the error raise on |
I created a entire new project and now works. The strange is that I created this project using Vite create and all setup comes directly from template. |
your reproduction is private, so I can’t access it. anyways, my guess is that you are using
I’m transferring this to the router repo. @schiller-manuel FYI |
please provide the reproduction |
Encountered the same problem yarn create vite -> tanstack router -> choose env, trpc, query in the add-ons I dont want tanstack start as im making a SPA, still it ignores my request and creates a tanstack start app PS D:\code\captur-apis\ui> yarn create vite
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-vite
- cva
│
◇ Project name:
│ tester
│
◇ Select a framework:
│ React
│
◇ Select a variant:
│ TanStack Router ↗
yarn create v1.22.22
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-tsrouter-app
┌ Let's configure your TanStack application
│
◇ Select the router type:
│ File Router - File-based routing structure
│
◇ Would you like to use Tailwind CSS?
│ No
│
◇ Select toolchain
│ Biome
│
◇ What add-ons would you like for your project?
│ T3Env, Query, tRPC
│
◇ Would you like any examples?
│ none
│
◇ Initialized git repository
│
◇ Installed dependencies
│
▲ Warnings:
│ TanStack Start is not yet at 1.0 and may change significantly or not be compatible with other add-ons.
│ Migrating to Start might require deleting node_modules and re-installing.
│
└ Your TanStack app is ready in 'tester'.
Use the following commands to start your app:
% cd tester
% yarn run dev
Please check the README.md for information on testing, styling, adding routes, etc. |
we can’t look into it without a reproduction we can actually access ... |
Hey @TkDodo! 👋 Fantastic work as always! Love what you provide to the ecosystem and the passion you have! Truely inspiring 🥳 I found this issue as I am also getting this error when using TanStack Router augmented with react-router-with-query. Is this designed only for use in SSR via TanStack Start? I found @nekochan0122 's demo repo for implementing authentication and it uses it, but within a TSS application (TanStack Start). In it, from what I can see, from this line that the export interface RouterContext {
queryClient: QueryClient;
}
export const router = routerWithQueryClient(
createRouter({
routeTree,
context: { queryClient } as RouterContext,
// Since we're using React Query, we don't want loader calls to ever be stale
// This will ensure that the loader is always called when the route is preloaded or visited
defaultPreloadStaleTime: 0,
defaultStructuralSharing: true,
scrollRestoration: true,
}),
queryClient,
); Feels like if it is added internally then it should be dropable in the internal router and the root? Or is this a constraint of getting typing to work correctly? If I use TypeError: Cannot read properties of undefined (reading 'getStreamedValue') when attemping any I also added the context to export const Route = createRootRouteWithContext<RouterContext>()({
component: Component,
}); It is NOT using TanStack Start. Is this expected? Is the package only meant to be called for Isometric network requests and not pure CSR apps? Sorry if this discombobulated 😅 Let me know if you'd like be to elaborate. TL;DR: Using |
this package is indeed not meant for pure-client-side apps. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If I use useQuery hook always throw an error
Cannot read properties of undefined (reading 'getStreamedValue')
. Even a dummy hook without external fetch. Mutation works all good.Your minimal, reproducible example
https://codesandbox.io/p/github/DeltaTypes/vch-kpi-platform/feat/vechiel-template-form-xlsx
Steps to reproduce
docker-compose up -d
npm run db:migrate-dev
npm run prisma:seed
Expected behavior
Use of useQuery without any error as useMutation works.
How often does this bug happen?
Every time
Screenshots or Videos
Platform
Windows
Browser: Vivaldi and Google Chrome
Tanstack Query adapter
None
TanStack Query version
latest
TypeScript version
^5.7.2
Additional context
No response
The text was updated successfully, but these errors were encountered: