tRPCttRPC
Powered by
fahadF
tRPC•3y ago•
22 replies
fahad

TRPCError class, public readonly cause?: Error; this line should have override function

hey i am trying to use the TRPCError for throwing errors in my apps, but i am getting this error, changing the line
from
public readonly cause?: Error;
public readonly cause?: Error;

to
public override readonly cause?: Error;
public override readonly cause?: Error;

fixes the problem the problem but i am doing that in node_modules which is not how this gets resolved,
how do i resolve this?

when trying to use module arugmentation, i am getting an dupliate declare class error meaning the TRPCError class has already be declared in TRPCError.d.ts file

please help me resolve this issue,

my @trpc/server and @trpc/client version is
    "@trpc/client": "^10.38.5",
    "@trpc/server": "^10.38.5",
    "@trpc/client": "^10.38.5",
    "@trpc/server": "^10.38.5",


my typescript version is above 5

i am using turborepo,
this error was not there before, but since i was doing some migration of my trpc code to a seperate trpc package, i am getting these errrors
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

TRPCError that has TRPCError as cause
TkDodo 🔮TTkDodo 🔮 / ❓-help
3y ago
Throw custom TRPCError with specific cause
NeonNNeon / ❓-help
4y ago
difference between cause and message on TRPCError?
NickNNick / ❓-help
3y ago
Error: TRPCError: A non-domain error occurred
'tonyyprints'''tonyyprints' / ❓-help
2y ago