wleistraW
tRPC6mo ago
2 replies
wleistra

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",

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.

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.
Was this page helpful?