Missing declaration file with `queryCompiler`?

Hey folks, I'm using the newest setup with 6.7.0:
datasource db {
provider = "sqlite"
url = "file:../data/database.db"
}

generator client {
provider = "prisma-client"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
output = "../app/generated/prisma"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
datasource db {
provider = "sqlite"
url = "file:../data/database.db"
}

generator client {
provider = "prisma-client"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
output = "../app/generated/prisma"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
and
import { PrismaBetterSQLite3 } from "@prisma/adapter-better-sqlite3";
import { PrismaClient } from "../generated/prisma";

const adapter = new PrismaBetterSQLite3({
url: "file:./data/database.db",
});

const database = new PrismaClient({ adapter });

export { database };
import { PrismaBetterSQLite3 } from "@prisma/adapter-better-sqlite3";
import { PrismaClient } from "../generated/prisma";

const adapter = new PrismaBetterSQLite3({
url: "file:./data/database.db",
});

const database = new PrismaClient({ adapter });

export { database };
The issue I'm running into it with type-checking:
app/generated/prisma/internal/class.ts:79:40 - error TS7016: Could not find a declaration file for module '@prisma/client/runtime/query_compiler_bg.sqlite.mjs'. '/home/jens/development/fuel/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.mjs' implicitly has an 'any' type.
If the '@prisma/client' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@prisma/client/runtime/query_compiler_bg.sqlite.mjs';`

79 getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.sqlite.mjs"),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

 ELIFECYCLE  Command failed with exit code 1.
app/generated/prisma/internal/class.ts:79:40 - error TS7016: Could not find a declaration file for module '@prisma/client/runtime/query_compiler_bg.sqlite.mjs'. '/home/jens/development/fuel/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.mjs' implicitly has an 'any' type.
If the '@prisma/client' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@prisma/client/runtime/query_compiler_bg.sqlite.mjs';`

79 getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.sqlite.mjs"),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

 ELIFECYCLE  Command failed with exit code 1.
Has anyone else ran into this? What am I doing wrong here?
2 Replies
Prisma AI Help
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
juniperxxd
juniperxxdOP2d ago
GitHub
Type error in src/generated/prisma/internal/class.ts when upgradi...
Bug description I'm trying to upgrade our app from 6.5.0 to 6.7.0 along with new preview feature driverAdapters. When we now try to compile the code we are getting this error from tsc and I'...

Did you find this page helpful?