drizzle orm

i can't use postgres with drizzle orm with sapphire/cli
8 Replies
čamdžić
čamdžićOP4mo ago
No description
čamdžić
čamdžićOP4mo ago
or can someone tell me any other good postgres lib
UndiedGFX
UndiedGFX4mo ago
The issue is clear Add the type: module in package.json
čamdžić
čamdžićOP4mo ago
then whole code breaks XD
UndiedGFX
UndiedGFX4mo 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ćOP4mo ago
its tsc and im using sapphire tsconfig which already uses esm .
UndiedGFX
UndiedGFX4mo ago
We always recommended prisma Never used drizzle tho
dan
dan4mo 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