tRPCttRPC
Powered by
zirkelcZ
tRPC•3y ago•
11 replies
zirkelc

TypeScript Alias Imports don't get resolved ont the Client

I have a Monorepo with a multiple
/packages/*
/packages/*
packages, each has its own
tsconfig.json
tsconfig.json
. I noticed that I get type errors on the
client
client
side if I use TypeScript alias path imports on the
server
server
package. The alias import paths for the server are only defined in the
server/tsconfig.json
server/tsconfig.json
and not in the
client/tsconfig.json
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?
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

Can't get client to work
HuzefHHuzef / ❓-help
4y ago
SSR and loading indicators - I don't get it
nehalistNnehalist / ❓-help
4y ago
Don't understand cache
VengeanceVVengeance / ❓-help
2y ago
[Typescript] Client query / mutate has any type
KhojoKKhojo / ❓-help
10mo ago