-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PrismaJS not working since process.chdir cannot be used in workers #263
Comments
Aslong as you need to set |
So this would theoretically need to be fixed by alt:V? |
Yes |
any updates on this issue? |
@15322107
Although if you're not querying the database 1000 times per second, that "drastically slower" performance is really not an issue. For loading/saving the player and doing occasional query for some menu you might as well could use google sheets and players would notice no difference whatsoever. |
@15322107
I'm using this setup as workaround: setup-globals.ts // Until prisma starts supporting ESM, this is the workaround
import { createRequire } from "module";
global.require = createRequire(import.meta.url);
process.chdir = () => {}; |
Description of the problem
When trying to use PrismaJS, you'll instantly get the error, that
process.chdir() is not supported in workers
. The only workaround for that right now, is to use the wsl, which would be very laborious to setup just for one project.Reproduction steps
engineType = "binary"
in the client in your schemayarn prisma generate
ornpx prisma generate
Expected behaviour
There should be no error saying
Additional context
No response
Operating system
Windows 10
Version
15.0-dev79
Scope
server
Reproduction tested
The text was updated successfully, but these errors were encountered: