-
-
Couldn't load subscription status.
- Fork 126
Description
Description:
I'm getting the following error when running zenstack generate:
Prisma Enhancer: Cannot find prisma-client-js generator in the schema
However, I do have a generator client block in my schema:
generator client {
provider = "prisma-client"
runtime = "node"
moduleFormat = "cjs"
output = "../src/generated/prisma"
}More importantly, the issue seems to be triggered only when I use a type for the user definition (as suggested in the documentation):
type User {
id String @id
role UserRole
@@auth
}If I switch it to a model, the error disappears — but I don't want to store users in the database, as I'm using an external auth service.
Expected behavior:
Since the [documentation](https://zenstack.dev/docs/the-complete-guide/part1/access-policy/current-user) explicitly supports using type instead of model for describing the shape of auth(), this setup should be valid and should not break enhancer generation.
Reproduction:
- Use a minimal schema with
type User { @@auth } - Run
zenstack generate - Observe the Enhancer error even if
generator clientis defined
Versions:
database: Postgres@zenstackhq/runtime: 2.15.0prisma: 6.8.2