Title
m

Mischa

09/21/2021, 7:10 AM
Upgrading to Prisma 3.0.1, I'm getting a new error that looks like it could be related to importing types across packages in my npm7 monorepo
error TS2742: The inferred type of 'doStuff' cannot be named without a reference to 'myapp-repo/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.
easily worked around but strange. I'm trying to infer return types of functions doing prisma queries across packages so I guess that doesn't work anymore
j

Joël

09/21/2021, 12:57 PM
Which version of TypeScript do you have?
m

Mischa

09/21/2021, 4:27 PM
4.4.3
j

Joël

09/22/2021, 2:46 PM
My colleague says
That usually means that we are not exported a type but it is used in a function definition or another type. My bet is that he’s retrieving such an instance (via inference) and that error pops up.