[Bug] Issues with zenstack generate Command During Docker Image Build
Description and Expected Behavior
When compiling a Docker image, the zenstack generate command fails to execute properly, displaying an error indicating that Prisma is not found. The command seems to only support a globally installed version of Prisma. This dependency on a global installation significantly increases the length of my Docker build process and prevents the exclusion of packages that are not needed in the production environment. The expected behavior is for zenstack generate to work with a locally installed version of Prisma, allowing for a more efficient and streamlined Docker build process.
Screenshots
remove
RUN pnpm add prisma -g
or use pnpx run
Environment (please complete the following information):
- ZenStack version: 2.1.2
- @zenstackhq/openapi: 2.1.2
- Prisma version: 5.12.1
Hi @Siykt , ZenStack runs prisma with a normal "npx prisma" command so it shouldn't require prisma to be globally installed. In fact, most of the projects that use ZenStack have prisma installed only locally.
Does your project build successfully outside of docker? Just wondering if it's specific to running inside docker.
I appreciate your response @ymc9 . I'm using Windows 10 and managing packages with pnpm, but I can't successfully execute pnpm zenstack generate locally. It only works when I add the global prisma:
I've removed global
prismato reproduce this issue..