wleistra
wleistra4w ago

Tanstack React Query and TRPC package version incompatibility

I updated the TRPC and Tanstack packages to their latest versions.
-"@tanstack/react-query": "^5.80.2",
-"@trpc/client": "11.2.0",
-"@trpc/react-query": "11.2.0",
-"@trpc/server": "11.2.0",

+"@tanstack/react-query": "^5.83.0",
+"@trpc/client": "11.4.3",
+"@trpc/react-query": "11.4.3",
+"@trpc/server": "11.4.3",
-"@tanstack/react-query": "^5.80.2",
-"@trpc/client": "11.2.0",
-"@trpc/react-query": "11.2.0",
-"@trpc/server": "11.2.0",

+"@tanstack/react-query": "^5.83.0",
+"@trpc/client": "11.4.3",
+"@trpc/react-query": "11.4.3",
+"@trpc/server": "11.4.3",
But now the build fails with
The inferred type of '<<ProcedureNameHere>>' cannot be named without a reference to '../../../../../node_modules/@trpc/react-query/dist/getQueryKey.d-CruH3ncI.mjs'. This is likely not portable. A type annotation is necessary.
The inferred type of '<<ProcedureNameHere>>' cannot be named without a reference to '../../../../../node_modules/@trpc/react-query/dist/getQueryKey.d-CruH3ncI.mjs'. This is likely not portable. A type annotation is necessary.
Is there some TS incompatibility between these? We still use the classic way for 95% of our packages in our monorepo, slowly migrating to the new way.
1 Reply
wleistra
wleistraOP4w ago
Just updating the TRPC version and keeping the tanstack/react-query version as it was ^5.80.2 results in same error =/

Did you find this page helpful?