zenstack
zenstack copied to clipboard
Broken reference/return type of `enhance` missing after running `zenstack generate`
Description and expected behavior
- Create a sample Turborepo project using the "with-prisma" example, instructions here. i.e.
pnpm dlx create-turbo@latest --example with-prisma
. Be sure to select pnpm for the package manager. - Run
pnpm dlx zenstack@latest init
from thepackages/database
workspace to add zenstack. - Modify
packages/database/src/client.ts
to export PrismaClient from prisma and everything from zenstack. - Modify
apps/web/src/app/page.tsx
to create an enhanced database client by consuming @repo/database. - Observe the return type of
enhance
to beany
. Navigating to declaration shows the module is missing.
Reproduction can be found here. Note that the runtime executes successfully. However, no typing information is available to IDEs.
Screenshots
Environment (please complete the following information):
- ZenStack version: 2.4.1
- Prisma version: 5.10.2
- Database type: Postgresql
Additional context
- Windows 11 23H2
- Node v22.8.0
- pnpm v9.9.0
- Webstorm 2024.2.1