Skip to content

Zenstack generate fails when trying to use tRPC plugin with strongly typed JSON #2301

@k-ahlawat

Description

@k-ahlawat

Description and expected behavior
When I add a strongly typed JSON column to my schema, and then run zenstack generate with the tRPC plugin enabled, it generates, but the generated code is unable to be compiled by tsc due to the following error:

The inferred type of 'createRouter' cannot be named without a reference to '../../../../node_modules/.pnpm/@zenstackhq+runtime@2.18.1_@prisma+client@6.6.0_prisma@6.6.0_typescript@5.8.3__typescript@5.8.3__zod@3.25.76/node_modules/.zenstack/logical-prisma-client/runtime/library.js'. This is likely not portable. A type annotation is necessary.

15 export default function createRouter() {
                           ~~~~~~~~~~~~

I'd expect it to just work, not sure where it's trying to reference the deep path from.

Environment (please complete the following information):

  • ZenStack version: 2.18.1
  • Prisma version: 6.6.0
  • Database type: postgresql

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions