Issues with multiple folder schemas.

Hey all, I am currently using the "prismaSchemaFolder" preview feature, and I went to do: bunx prisma generate but I am now seeing the following:
Environment variables loaded from .env
Error: Could not find Prisma Schema that is required for this command.
You can either provide it with `--schema` argument,
set it in your `prisma.config.ts`,
set it as `prisma.schema` in your package.json,
or put it into the default location (`./prisma/schema.prisma`, or `./schema.prisma`.
Checked following paths:

schema.prisma: file not found
prisma/schema.prisma: file not found

See also https://pris.ly/d/prisma-schema-location
Environment variables loaded from .env
Error: Could not find Prisma Schema that is required for this command.
You can either provide it with `--schema` argument,
set it in your `prisma.config.ts`,
set it as `prisma.schema` in your package.json,
or put it into the default location (`./prisma/schema.prisma`, or `./schema.prisma`.
Checked following paths:

schema.prisma: file not found
prisma/schema.prisma: file not found

See also https://pris.ly/d/prisma-schema-location
This is my bunx prisma -v
Environment variables loaded from .env
prisma : 6.6.0
@prisma/client : 6.6.0
Computed binaryTarget : debian-openssl-1.1.x
Operating System : linux
Architecture : x64
Node.js : v22.12.0
TypeScript : 5.8.3
Query Engine (Node-API) : libquery-engine f676762280b54cd07c770017ed3711ddde35f37a (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine : schema-engine-cli f676762280b54cd07c770017ed3711ddde35f37a (at node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm : @prisma/prisma-schema-wasm 6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a
Default Engines Hash : f676762280b54cd07c770017ed3711ddde35f37a
Studio : 0.511.0
Environment variables loaded from .env
prisma : 6.6.0
@prisma/client : 6.6.0
Computed binaryTarget : debian-openssl-1.1.x
Operating System : linux
Architecture : x64
Node.js : v22.12.0
TypeScript : 5.8.3
Query Engine (Node-API) : libquery-engine f676762280b54cd07c770017ed3711ddde35f37a (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine : schema-engine-cli f676762280b54cd07c770017ed3711ddde35f37a (at node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm : @prisma/prisma-schema-wasm 6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a
Default Engines Hash : f676762280b54cd07c770017ed3711ddde35f37a
Studio : 0.511.0
1 Reply
Prisma AI Help
Prisma AI Help2mo ago
Skipping coffee for instant knowledge! Let's brew that AI answer now. This issue is related to changes in Prisma 6.6.0 regarding how schema folders are handled with the prismaSchemaFolder preview feature. As of Prisma 6.6.0, you must explicitly specify the location of your Prisma schema folder. The automatic detection of schema folders in default locations has been removed. This is a breaking change from previous versions. To fix this issue, you need to do one of the following: 1. Add the schema path to your package.json:
"prisma": {
"schema": "prisma/schema"
}
"prisma": {
"schema": "prisma/schema"
}
2. Or specify the schema path directly in your command:
bunx prisma generate --schema=prisma/schema
bunx prisma generate --schema=prisma/schema
3. Or create a prisma.config.ts file with the schema path. Important: Make sure you're specifying the folder path, not the file path. For example, use "prisma/schema" instead of "prisma/schema/schema.prisma". Also, ensure your migrations folder is placed next to the .prisma file that defines the datasource block. This change was introduced in Prisma 6.6.0 to fix confusion and inconsistent folder lookup behavior. For more details, see: - Github Issue #26840 - Github Issue #26849 - Multi-file Prisma Schema documentation ✅ Great, thanks for letting us know that this solved your question!

Did you find this page helpful?