Adicss
Adicss2d ago

Upgrading tRPC v10 to v11 in NextJS 15.0.1

I'm want to upgrade my tRPC to v11, I already follow the instructions on the docs https://trpc.io/docs/migrate-from-v10-to-v11#installation--upgrading using pnpm. Installation is running smoothly, but when i run pnpm build i get
./app/forum/[publicId]/page.tsx:147:48
Type error: Parameter 'comment' implicitly has an 'any' type.

145 | loadingFallback={<CommentLoaderState />}
146 | >
> 147 | {postResponse?.data?.comments.map((comment) => (
| ^
148 | <Comment
149 | setResponse={setResponse}
150 | {...comment}
 ELIFECYCLE  Command failed with exit code 1.
./app/forum/[publicId]/page.tsx:147:48
Type error: Parameter 'comment' implicitly has an 'any' type.

145 | loadingFallback={<CommentLoaderState />}
146 | >
> 147 | {postResponse?.data?.comments.map((comment) => (
| ^
148 | <Comment
149 | setResponse={setResponse}
150 | {...comment}
 ELIFECYCLE  Command failed with exit code 1.
I thought i miss pnpm prisma generate but as you can see in my package.json script, i already include it (i run it manually too) but an errors still exists. I try to hover the type on my vscode, it tell me correct type like the old (tRPC v10). How do i fix that? Thank you
Migrate from v10 to v11 | tRPC
This is a current work in progress representing version 11.
No description
4 Replies
MadaShindeInai
Is your Typescript verion greater then 5.7.3?
Adicss
AdicssOP2d ago
no
No description
FluX
FluX2d ago
tRPC requires TypeScript >=5.7.2
It says it at the top of their docs. But I don't know if this will actually fix it. The upgrade you should do anyways
Adicss
AdicssOP17h ago
Ohh I don't know why upgrade command I copied from the docs doesn't automatically update typescript too I'll try it, thanks Solved!

Did you find this page helpful?