drizzle orm

i can't use postgres with drizzle orm with sapphire/cli
8 Replies
čamdžić
čamdžićOP5mo ago
No description
čamdžić
čamdžićOP5mo ago
or can someone tell me any other good postgres lib
UndiedGFX
UndiedGFX5mo ago
The issue is clear Add the type: module in package.json
čamdžić
čamdžićOP5mo ago
then whole code breaks XD
UndiedGFX
UndiedGFX5mo ago
The thing is that drizzle-orm is using imports that can not be compiled to commonjs. Are you using typescript? If yes, make sure whatever your compiler is, to compile the code to esm instead of cjs If not, there is a cool package called cjstoesm just input all the files and it should do the job
čamdžić
čamdžićOP5mo ago
its tsc and im using sapphire tsconfig which already uses esm .
UndiedGFX
UndiedGFX5mo ago
We always recommended prisma Never used drizzle tho
dan
dan5mo ago
Fyi drizzle is much much slower on most operations compared to something like prisma or typeorm, so you should probably stick with those two And prisma is pretty easy to use
Want results from more Discord servers?
Add your server