"This is likely not portable" error

Iiway14/18/2023
Randomly started getting this weird error on my front end, can't find anything online on it. Something wrong with my project config, I'm sure

It appears on my trpc react but also in some other places:

export const api = createTRPCReact<AppRouter>();



Any ideas?
Iiway14/18/2023
had composite: true in the tsconfig.json, removing that fixed it idk why
Nnlucas4/18/2023
I bet @ixahmedxi can tell us
Nnlucas4/18/2023
I’ve seen this a lot when the api project has dependencies producing types into the API which aren’t available to the client via node_modules
Nnlucas4/18/2023
Composite might end up relating to that behaviour
Iixahmedxi4/18/2023
hmm i remember getting this error as well
Iixahmedxi4/18/2023
but i completely forgot how i solved it
Nnlucas4/18/2023
Using monorepo module hoisting or installing the dep in both projects generally fixes it
Nnlucas4/18/2023
But there are other magic tsconfig things I’ve seen people do (quite a bit of history in this forum)
Iiway14/18/2023
hmm I just disabled hoisting to fix some other issue lol
Iiway14/18/2023
probably what caused it to start happening
Nnlucas4/18/2023
You can be more specific in how you disable hoisting, or you can install Prisma into both projects just for the types
Nnlucas4/18/2023
Or tsconfig tweaks but that seems fragile and might break other stuff too 😅