next.jsprismaapp-router

Error: "prismaSchemaFolder preview feature must be enabled" when running npx prisma generate


I'm facing the following issue when running npx prisma generate in my project located at c:\Users\ENGINEER-PC\Desktop\postgresql_project:

 Running prisma generate:
- c:\Users\ENGINEER-PC\Desktop\postgresql_project
- npx prisma generate
Command failed: npx prisma generate
Error: Could not load schema from `prisma\schema` provided by "prisma.schema" config of `package.json`: "prismaSchemaFolder" preview feature must be enabled

I've already added the necessary configuration in my package.json, but the error persists. It seems the preview feature isn't enabled properly in my Prisma schema.

Has anyone encountered this issue before? How can I fix it?

How i make configuration


Solution

  • I was having the same issue but I was able to solve it by moving the base schema.prisma file into the newly made schema directory.