app crashing while using pm2 with prisma

While using pm2, it crashes with that message when creating a record. New to prisma, what I did wrong?
5 Replies
Sturlen
Sturlen2y ago
you might get a more helpful error message if you run the prisma command directly in the terminal
JulieCezar
JulieCezar2y ago
You won't get a more helpful message no matter what you try I had this one and it was a nightmare... however, the solution is relatively simple tldr; the problem is in the prisma generator engine which had some problems with node>16.5 however they should have fixed this issue with the release a month or so ago so, you should first check if you have the newest version of node and prisma installed
JulieCezar
JulieCezar2y ago
If you don't have you should install it and hopefully it works, if you cant or dont want to then you need to update your prisma schema and add this part at the top:
generator client {
provider: "prisma-client-js",
engineType: "binary"
}
generator client {
provider: "prisma-client-js",
engineType: "binary"
}
engineType is the important one here you can read more here: https://www.prisma.io/docs/concepts/components/prisma-engines
Prisma
Prisma engines
Learn about Prisma internals and how it works "under the hood". Prisma tools are based on an engine-layer which manages the communication with the database.
polioan
polioan2y ago
omg. thx u
JulieCezar
JulieCezar2y ago
I know that feeling of relief xD
Want results from more Discord servers?
Add your server