-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
I was following a video to use nextj.js 13 app router, trcp, react-query and all was good until i try to call my query from the client and sudenly all crash. I try to find a solution on google but isn't reported yet. Then I check and find that react-query have released just days before this post to 5.0.0. I did a downgrade to 4.36.1 and now all work properly.
PD: I will add more info later
Ref to video follow all steps until min 7:30
trace of the error
./node_modules/.pnpm/@trpc+react-query@10.40.0_@tanstack+react-query@5.0.0_@trpc+client@10.40.0_@trpc+server@10.40_j5b6dh2qmadaikfcthvzn2bani/node_modules/@trpc/react-query/dist/createHooksInternal-f1d4019d.mjs
Attempted import error: 'hashQueryKey' is not exported from '@tanstack/react-query' (imported as 'hashQueryKey').
Import trace for requested module:
./node_modules/.pnpm/@trpc+react-query@10.40.0_@tanstack+react-query@5.0.0_@trpc+client@10.40.0_@trpc+server@10.40_j5b6dh2qmadaikfcthvzn2bani/node_modules/@trpc/react-query/dist/createHooksInternal-f1d4019d.mjs
./node_modules/.pnpm/@trpc+react-query@10.40.0_@tanstack+react-query@5.0.0_@trpc+client@10.40.0_@trpc+server@10.40_j5b6dh2qmadaikfcthvzn2bani/node_modules/@trpc/react-query/dist/index.mjs
./src/app/_trpc/client.ts
./src/app/_trpc/Provider.tsx
package.json
"dependencies": {
"@tanstack/react-query": "^5.0.0",
"@trpc/client": "^10.40.0",
"@trpc/react-query": "^10.40.0",
"@trpc/server": "^10.40.0",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
}
}
Your minimal, reproducible example
check the code here
https://github.com/jsaumap/next-trpc-start/tree/bug-react-query
Steps to reproduce
Expected behavior
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tanstack Query adapter
react-query
TanStack Query version
v5.0.0
TypeScript version
No response
Additional context
No response
kyeshmz, TychosDrunkElk, ajhenry, elenamik, dmitrix11 and 8 more
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation