zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.07k stars 88 forks source link

npx zenstack generate fails to run Prisma plugin on Windows 10 only #614

Closed SadmanYasar closed 1 year ago

SadmanYasar commented 1 year ago

This is the repository where I am using Zenstack: https://github.com/SadmanYasar/proptory-webapp-nextjs

After running npx zenstack generate, I get the following:

⌛️ ZenStack CLI v1.0.0-beta.13, running plugins
⠋ Running plugin PrismaEnvironment variables loaded from .env
Error: Provided --schema at C:\\Users\\PC\\Desktop\\Web doesn't exist.
✖ Running plugin Prisma
Prisma: Failed to run "prisma generate"

Running npx prisma generate separately works fine. This issue is resolved when I ran this repository on Github Codespaces with Ubuntu.

Environment

Additional context Problem only exists on Windows 10

ymc9 commented 1 year ago

Thanks for the repro project @SadmanYasar !

@jiashengguo , could you help take a look into this?

jiashengguo commented 1 year ago

@SadmanYasar, I tried it on a Windows 10 machine, and couldn't see the error.

From the error, it seems that it can't find the generated prima file in C:\\Users\\PC\\Desktop\\Web when calling the prisma generate command. Any hint on what C:\\Users\\PC\\Desktop\\Web is about?

ymc9 commented 1 year ago

Closing for now