prisma 6.7.0 not working in vercel
I’m encountering an issue after upgrading to a new Prisma version. When calling prisma.form.create(), I get the following error:
prisma:error
Invalid
prisma.form.create()
invocation:
ENOENT: no such file or directory, open '/var/task/generated/prisma/query_compiler_bg.wasm'
Unhandled Rejection: Error: ENOENT: no such file or directory, open '/var/task/generated/prisma/query_compiler_bg.wasm'
at Object.getQueryCompilerWasmModule (.next/server/chunks/141.js:88:10806)
at <unknown> (.next/server/chunks/141.js:18:30161)
at async Object.loadQueryCompiler (.next/server/chunks/141.js:18:30445)
at async aK.instantiateQueryCompiler (.next/server/chunks/141.js:18:31858) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/task/generated/prisma/query_compiler_bg.wasm'
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.16 Replies
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into
#ask-ai
for a quick spin!It looks like you’re using a custom output path. Were you using one before?
No, I was trying the new no rust engine and getting this error on prod, in local it is working fine.
try this it worked for me. generate prisma client like ../node_modules/@your-app-name/prisma-client AND import { PrismaClient } from @your-app-name/prisma-client'
don't forget to add this to your package.json "postinstall": "npx prisma generate --no-engine"
still getting
ENOENT: no such file or directory, open '/var/task/prisma/generated/query_compiler_bg.wasm'
my setup
schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
output = "./generated/"
}
prisma client
import { PrismaPg } from "@prisma/adapter-pg";
import { PrismaClient } from "../../prisma/generated";
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
export const db = new PrismaClient({
adapter,
log: ["query", "error", "warn"],
});
@kumard3 change provider in the generator block to "prisma-client" instead of "prisma-client-js"
run prisma generate after that
anyway, most likely u wont want to use query compiler feature right now as its not ready for production yet
for example, arrays get returned as comma delimited string
try this approach
Generate the Prisma Client inside node_modules
In your schema.prisma, set the output path for the client to a directory inside node_modules, for example:
generator client {
provider = "prisma-client-js"
output = "../node_modules/@my-app/prisma-client"
}
Then, import your client like this:
import { PrismaClient } from '@my-app/prisma-client';
This approach is recommended in several discussions and has resolved the exports is not defined error for others using SvelteKit, Vite, and similar tools Prisma Sveltekit Generated Client -> exports is not defined, Multiple Connections / Databases / Datasources.
i tried the approach and my app is working well on netlify after days of finding solution
tried both the solution, but getting the same error @Simire @unrok4009
@unrok4009 getting this specific error when trying "prisma-client"
There is one more weird things that is, I have a static route which generate some page and in that it is working at the build time, both using same api..
Hi! Would you mind giving us a reproduction repo so we can dig into this further?
could u do
pnpm install prisma@dev @prisma/client@dev
regenerate prisma client, and check again?
6.7.0
is using /* @ts-nocheck */
instead of // @ts-nocheck
comment which works only for one line instead of whole filecheck how i did mine



@jonfanz this is a clone repo which i am using. the setup is still same .
https://github.com/kumard3/prisma-no-rust
at the build time the prisma client is working, it is creating a static page
https://prisma-no-rust.vercel.app/
GitHub
GitHub - kumard3/prisma-no-rust
Contribute to kumard3/prisma-no-rust development by creating an account on GitHub.
@Simire the , is actually not wokring and this is the error i am getting at the build time
@jonfanz There is no issue when running it on local. It is only happening at the production.
this is still not working.
https://github.com/kumard3/prisma-no-rust/tree/9a332154526a2fe749c892e0c6cfe28fb3a4c886
followed the doc https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine
followed the @Simire method https://github.com/kumard3/prisma-no-rust/tree/d98661643684db9b64a8c80a2d9c227d907c87a2
followed the @unrok4009 method https://github.com/kumard3/prisma-no-rust/tree/afda2efd6e1ad5feff6c77fdd387a78a2ea8eb28
GitHub
GitHub - kumard3/prisma-no-rust at 9a332154526a2fe749c892e0c6cfe28f...
Contribute to kumard3/prisma-no-rust development by creating an account on GitHub.
Use Prisma ORM without Rust engines | Prisma Documentation
Learn how to use Prisma ORM without Rust engines
GitHub
GitHub - kumard3/prisma-no-rust at d98661643684db9b64a8c80a2d9c227d...
Contribute to kumard3/prisma-no-rust development by creating an account on GitHub.
GitHub
GitHub - kumard3/prisma-no-rust at afda2efd6e1ad5feff6c77fdd387a78a...
Contribute to kumard3/prisma-no-rust development by creating an account on GitHub.
looks like prisma bug then, updating to dev should at least silence compilation type errors
your best bet is using driverAdapters feature without queryCompiler for now
also this
^
@Jon Harrell i have updated to prisma 6.8.2 and i am getting this error at vercel and netlify
same error on both vercel and netlify