I ran into the same issue, and what ended up working for me was running the command with sudo
at the beginning.
Example: sudo npx prisma generate
.
It seems to be a permission issue on some systems, and using sudo
allowed Prisma to generate the client without errors.