Closed NatoBoram closed 5 months ago
Hi @NatoBoram , thanks for reporting this. Could you let me know what framework you're using? Do you use vite for bundling?
I'm not using a framework, this is just an API from raw TypeScript files compiled with tsc
. I'm just using Zenstack, tRPC, Express and Prisma.
I'm not using a framework, this is just an API from raw TypeScript files compiled with
tsc
. I'm just using Zenstack, tRPC, Express and Prisma.
Got it. I believe it has something to do with the interop between ESM and CJS modules. Do you have a sharable project? @NatoBoram
Fixed in 2.1.0
Description and expected behavior
When using the trpc plugin, there's table files generated at
routers/<table_name>.ts
. Let's take a tableapi_key_org
.This outputs an error:
If we log
$Schema
, we get this:So
$Schema.Api_key_orgInputSchema.aggregate
is actually at$Schema.default.Api_key_orgInputSchema.aggregate
.Screenshots
Environment (please complete the following information):
Additional context