T
tRPC

TypeScript Alias Imports don't get resolved ont the Client

TypeScript Alias Imports don't get resolved ont the Client

Zzirkelc6/16/2023
I have a Monorepo with a multiple /packages/* packages, each has its own tsconfig.json. I noticed that I get type errors on the client side if I use TypeScript alias path imports on the server package. The alias import paths for the server are only defined in the server/tsconfig.json and not in the client/tsconfig.json. If I change the alias imports on the server side to relative imports, it works on the client. It seems like TypeScript cannot follow the imports correctly from client to server, because it doesn't check the server tsconfig. Anyone the same issue?

Looking for more? Join the community!

T
tRPC

TypeScript Alias Imports don't get resolved ont the Client

Join Server