FiveM and Prisma

Hey, has anyone tried prisma with FiveM? for some day come the node 22 update for it. I become this error but idk why. https://pastie.io/fkkldv.less pls tag me if some one has a idea
23 Replies
Prisma AI Help
You selected the bot's instantaneous insights. Let me compile your answer right away! I apologize, but I don't have enough information in the provided knowledge sources to directly answer your question about using Prisma with FiveM or the specific error you're encountering. However, I can provide some general information about Prisma and Node.js version compatibility that may be relevant: 1. Prisma has specific Node.js version requirements. According to the Prisma documentation, Prisma currently supports Node.js versions up to 22.11. 2. There have been issues reported with Prisma on newer Node.js versions. For example, this GitHub issue discusses problems with Node.js 22.13, which was a recent security update. 3. If you're using a very recent version of Node.js, you might encounter compatibility issues with Prisma. In such cases, you may need to either: - Downgrade your Node.js version to one that's officially supported by Prisma - Wait for Prisma to update their compatibility with newer Node.js versions 4. The error you're seeing mentions issues with libssl/openssl. This could be related to the Prisma engine's compatibility with your system's OpenSSL version. For the most up-to-date and specific information about your issue, I recommend checking the official Prisma documentation or their GitHub issues page. If you can't find a solution there, consider opening a new issue on the Prisma GitHub repository with details about your setup and the error you're encountering. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
begot
begot2w ago
seems like a permission issue. have you read up on other people integrating Prisma with FiveM servers? might be a runtime thing also, are you able to get more specific logs from Prisma?
DevPanda
DevPandaOP2w ago
thanks for your answer. how can i somehow provide even better logs from prisma?
begot
begot2w ago
can you try enabling all log levels on your client ('query', 'warn', 'error', 'info') to see if it's even trying to do anything - it could be that you're passing undefined data
begot
begot2w ago
this example seems to be using Prisma in a FiveM environment. might be worth checking out if you haven't already https://github.com/JustinMartinDev/experimental-rp/tree/main/lib/database
GitHub
experimental-rp/lib/database at main · JustinMartinDev/experimental...
Contribute to JustinMartinDev/experimental-rp development by creating an account on GitHub.
DevPanda
DevPandaOP2w ago
yes i had already seen that too. i also looked at the things and used some of them. i switched from esbuild and swc to rollup and had already solved a lot of problems
[ script:core] prisma:info Starting a postgresql pool with 17 connections.
[ script:core] prisma:info Encountered error during initialization:
[ script:core] prisma:error
[ script:core] Invalid `prisma.account.create()` invocation:
[ script:core]
[ script:core]
[ script:core] kill EPERM
[ script:core] Error: ~lw~[StartUp]~lr~ Failed to create test account PrismaClientKnownRequestError:
[ script:core] Invalid `prisma.account.create()` invocation:
[ script:core]
[ script:core]
[ script:core] kill EPERM
[ script:core] at QE.handleRequestError (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:7448)
[ script:core] at QE.handleAndLogRequestError (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:6772)
[ script:core] at QE.request (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:6479)
[ script:core] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[ script:core] at async a (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:265:9651)
[ script:core] at async test (@core/server.js:64:22)
[ script:core] prisma:info Starting a postgresql pool with 17 connections.
[ script:core] prisma:info Encountered error during initialization:
[ script:core] prisma:error
[ script:core] Invalid `prisma.account.create()` invocation:
[ script:core]
[ script:core]
[ script:core] kill EPERM
[ script:core] Error: ~lw~[StartUp]~lr~ Failed to create test account PrismaClientKnownRequestError:
[ script:core] Invalid `prisma.account.create()` invocation:
[ script:core]
[ script:core]
[ script:core] kill EPERM
[ script:core] at QE.handleRequestError (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:7448)
[ script:core] at QE.handleAndLogRequestError (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:6772)
[ script:core] at QE.request (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:256:6479)
[ script:core] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[ script:core] at async a (G:\Development\Dysenic\fivem\fxserver\server-data\node_modules\.pnpm\@[email protected]_prisma_bf37a8d2c13df1d2415bf21b1c701e8e\node_modules\@prisma\client\runtime\binary.js:265:9651)
[ script:core] at async test (@core/server.js:64:22)
begot
begot2w ago
i see, not much i can do with this, sadly. hard for me to understand what's happening if we can't get any proper errors to indicate what's wrong. Prisma team might have ran into something similar and will be able to assist you properly afaik it could be anything from runtime to passing invalid data to .create()
DevPanda
DevPandaOP2w ago
okay, then i have to wait
begot
begot2w ago
you could try passing mock data that you know is valid to see if it creates the account. if not, it’s probably something underlying
DevPanda
DevPandaOP2w ago
I have already tried. It really seems to be a runtime error
begot
begot2w ago
yeah go figure. have you tried using a non generated client? i had to import from @prisma/client directly in my cjs package
DevPanda
DevPandaOP2w ago
yes, it would be worth trying to do this via the data proxy. but it must also work without it
Nurul
Nurul2w ago
What is FiveM? I didn’t hear about it before today Are you referring to this? https://fivem.net/
FiveM
FiveM is a modification framework for GTA V, allowing you to play multiplayer on customized dedicated servers.
begot
begot2w ago
that's correct
DevPanda
DevPandaOP2w ago
yes any ideas? @Nurul any other? okay, then i go to drizzle for this Project. 😦
Nurul
Nurul7d ago
Apologies for the delay, I haven't tried it but does this guide help you? https://dev.to/justinmartindev/fivem-x-prisma-orm-3kpl
DEV Community
FiveM x Prisma ORM
⚠️ We are speaking about JavaScript/TypeScript FiveM server ⚠️⚠️ FiveM is a modification for...
Nurul
Nurul7d ago
Also found this, but seems a bit outdated: https://github.com/project-error/fivem-typescript-prisma
GitHub
GitHub - project-error/fivem-typescript-prisma: FiveM TypeScript bo...
FiveM TypeScript boilerplate with Prisma. Contribute to project-error/fivem-typescript-prisma development by creating an account on GitHub.
DevPanda
DevPandaOP7d ago
thanks, so from the first link the repo is not complete, I can't test it either and repo number 2 doesn't work either i have tried so many things esbuild, rollup, vite etc. but its will not work
Nurul
Nurul6d ago
Ah, thanks for letting me know. That's unfortunate. I don't see any existing GitHub Issues with FiveM. Would you mind opening one so that our ORM team can investigate? https://github.com/prisma/prisma/issues
GitHub
Issues · prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - Issues · prisma/prisma
DevPanda
DevPandaOP5d ago
yes i can open tomorrow a ticket 🙂
DevPanda
DevPandaOP4d ago
GitHub
prisma not work with FiveM · Issue #26466 · prisma/prisma
Bug description FiveM is commonjs only. i become this error here when i start my server: K:\Development\Dysenic\fivem\fxserver\server-data>K:\Development\Dysenic\fivem\fxserver\FXServer.exe +exe...
DevPanda
DevPandaOP4d ago
i'm fucking stupid. i forgot to check if the database exists normally prisma had always created it for me :facepalm:
Nurul
Nurul4d ago
I am glad to hear that you were able to find the issue 🙌

Did you find this page helpful?